Author: sshyrkov Date: Wed Oct 17 18:47:29 2007 New Revision: 18917 URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18917&repname= =3Djahia Log: JAHIA-1676: Sp2: workflow - Internal link wanring in case of desination pag= es not validated yet is non-understandable =
http://www.jahia.net/jira/browse/JAHIA-1676 Resolution: more meaningfull messages in case of integrity warnigns + disla= y page title of the target page Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources.p= roperties branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources_d= e.properties branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources_e= n.properties branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/engines/shared/Big= Text_Field.java branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/fields/Co= ntentBigTextField.java Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResou= rces.properties URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP= -BRANCH/core/src/conf/java/JahiaMessageResources.properties&rev=3D18917&rep= name=3Djahia =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources.p= roperties (original) +++ branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources.p= roperties Wed Oct 17 18:47:29 2007 @@ -318,12 +318,12 @@ org.jahia.engines.workflow.pageNotApplicable =3D Page ({0}) N/A in {= 1} org.jahia.engines.workflow.pageNotExisting =3D Page does not exist = -org.jahia.engines.shared.BigText_Field.stagingWarning =3D Page [<strong>{0= }</strong>] is in state "<strong>staging</strong>" and has never been valid= ated, which will cause a "<strong>403 Error</strong>" in "Live" mode, if th= e link is followed. -org.jahia.engines.shared.BigText_Field.markForDeleteWarning =3D Page [<str= ong>{0}</strong>] is in state "<strong>markForDelete</strong>" which will c= ause a "<strong>404 Error</strong>" after validation, if the link is follow= ed. -org.jahia.engines.shared.BigText_Field.approvalWarning =3D Page [<strong>{= 0}</strong>] in language [<strong>{1}</strong>] is in state "<strong>waitin= g For Approval</strong>" which might cause a "<strong>404 Error</strong>", = if the link is followed. -org.jahia.engines.shared.BigText_Field.notExistingWarning =3D Page [<stron= g>{0}</strong>] is not reachable which will cause a "<strong>404 Error</str= ong>", if the link is followed. -org.jahia.engines.shared.BigText_Field.lessAccessWarning =3D Page [<strong= >{0}</strong>] cannot be accessed by group(s) [<strong>{1}</strong>] which = can however access the link value. A click on the link will cause a "<stron= g>403 Error</strong>" for this(those) group(s). -org.jahia.engines.shared.BigText_Field.wrongKeys =3D URL key [<strong>{0}<= /strong>] is invalid. It is not linked to any page. +org.jahia.engines.shared.BigText_Field.stagingWarning =3D Field contains a= link to the page [<strong>{0}</strong>], which is in the "<strong>staging<= /strong>" state and has never been validated. That will cause a "<strong>40= 3 Error</strong>" in "Live" mode, if the link is followed. +org.jahia.engines.shared.BigText_Field.markForDeleteWarning =3D Field cont= ains a link to the page [<strong>{0}</strong>], which is in the "<strong>ma= rked for delete</strong>" state. That will cause a "<strong>404 Error</stro= ng>" after validation, if the link is followed. +org.jahia.engines.shared.BigText_Field.approvalWarning =3D Field contains = a link to the page [<strong>{0}</strong>] in language [<strong>{1}</strong>= ], which is in the "<strong>waiting for approval</strong>" state. That migh= t cause a "<strong>404 Error</strong>", if the link is followed. +org.jahia.engines.shared.BigText_Field.notExistingWarning =3D Field contai= ns a link to the page [<strong>{0}</strong>], which is not reachable. That = will cause a "<strong>404 Error</strong>", if the link is followed. +org.jahia.engines.shared.BigText_Field.lessAccessWarning =3D Field contain= s a link to the page [<strong>{0}</strong>], which cannot be accessed by gr= oup(s) [<strong>{1}</strong>] that can however access the link value. A cli= ck on the link will cause a "<strong>403 Error</strong>" for this(those) gr= oup(s). +org.jahia.engines.shared.BigText_Field.wrongKeys =3D Field contains a link= to the page with invalid URL key [<strong>{0}</strong>]. This key is not l= inked to any page. = org.jahia.engines.rights.ManageRights.future403warning =3D By removing the= READ rights on this page for users of group(s) [<strong>{0}</strong>], the= y will get a "<strong>403 Error</strong>" if they follow the link on page [= <strong>{1}</strong>]. It contains a BigText field containing a link to the= current page. org.jahia.engines.rights.ManageRights.futureChild403warning =3D By cutting= the inheritance on this page, users of group(s) [<strong>{0}</strong>] wil= l get a "<strong>403 Error</strong>" if they follow the link on page [<stro= ng>{1}</strong>]. It contains a BigText field containing a link to a subpag= e [<strong>{2}</strong>] of the current page. Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResou= rces_de.properties URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP= -BRANCH/core/src/conf/java/JahiaMessageResources_de.properties&rev=3D18917&= repname=3Djahia =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources_d= e.properties (original) +++ branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources_d= e.properties Wed Oct 17 18:47:29 2007 @@ -318,12 +318,12 @@ org.jahia.engines.workflow.pageNotApplicable =3D Seite ({0}) n. anwe= ndbar auf {1} org.jahia.engines.workflow.pageNotExisting =3D Die Seite existiert= nicht = -org.jahia.engines.shared.BigText_Field.stagingWarning =3D Die Seite [<stro= ng>{0}</strong>] befindet sich noch im "<strong>Staging-Status</strong>", d= a sie noch nicht validiert wurde. Die Ausf=C3=BChrung des Links kann deshal= b den <strong>Fehler 403</strong> im Live-Modus verursachen. -org.jahia.engines.shared.BigText_Field.markForDeleteWarning =3D Die Seite = [<strong>{0}</strong>] wurde "<strong>zum L=C3=B6schen markiert</strong>". = Die Ausf=C3=BChrung des Links kann deshalb nach der Validierung den <strong= >Fehler 404</strong> verursachen. -org.jahia.engines.shared.BigText_Field.approvalWarning =3D Die Seite [<str= ong>{0}</strong>] in der Sprache [<strong>{1}</strong>] befindet sich im St= atus "<strong>{1}</strong>Auf Genehmigung wartend<strong>". Die Ausf=C3=BCh= rung des Links kann deshalb den </strong>Fehler 404<strong> verursachen. -org.jahia.engines.shared.BigText_Field.notExistingWarning =3D Auf die Seit= e [<strong>{0}</strong>] kann nicht zugegriffen werden. Die Ausf=C3=BChrung= des Links kann deshalb den <strong>Fehler 404</strong> verursachen. -org.jahia.engines.shared.BigText_Field.lessAccessWarning =3D Der Zugriff a= uf die Seite [<strong>{0}</strong>] durch die Gruppe(n) [<strong>{1}</stron= g>] ist nicht m=C3=B6glich. Allerdings k=C3=B6nnen die betreffenden Gruppen= auf den Linkwert zugreifen. Ein Klick auf den Link verursacht f=C3=BCr die= se Gruppe(n) den <strong>Fehler 403</strong>. -org.jahia.engines.shared.BigText_Field.wrongKeys =3D URL-Schl=C3=BCssel [<= strong>{0}</strong>] ist ung=C3=BCltig. Er ist mit keiner Seite verkn=C3=BC= pft. +org.jahia.engines.shared.BigText_Field.stagingWarning =3D Das Feld enth=C3= =A4lt einen Link auf die Seite [<strong>{0}</strong>], die sich noch im "<s= trong>Staging-Status</strong>" befindet, da sie noch nicht validiert wurde.= Die Bet=C3=A4tigung des Links kann deshalb den "<strong>Fehler 403</strong= >" im Live-Modus verursachen. +org.jahia.engines.shared.BigText_Field.markForDeleteWarning =3D Das Feld e= nth=C3=A4lt einen Link auf die Seite [<strong>{0}</strong>], die "<strong>z= um L=C3=B6schen markiert</strong>" wurde. Die Bet=C3=A4tigung des Links kan= n deshalb nach der Validierung den "<strong>Fehler 404</strong>" verursache= n. +org.jahia.engines.shared.BigText_Field.approvalWarning =3D Das Feld enth= =C3=A4lt einen Link auf die Seite [<strong>{0}</strong>] in der Sprache [<s= trong>{1}</strong>], die sich im Status "<strong>Auf Genehmigung wartend</s= trong>" befindet. Die Bet=C3=A4tigung des Links kann deshalb den "<strong>F= ehler 404</strong>" verursachen. +org.jahia.engines.shared.BigText_Field.notExistingWarning =3D Das Feld ent= h=C3=A4lt einen Link auf die Seite [<strong>{0}</strong>], die ist nicht er= reichbar. Die Bet=C3=A4tigung des Links kann deshalb den "<strong>Fehler 40= 4</strong>" verursachen. +org.jahia.engines.shared.BigText_Field.lessAccessWarning =3D Das Feld enth= =C3=A4lt einen Link auf die Seite [<strong>{0}</strong>], auf die die Grupp= e(n) [<strong>{1}</strong>] keinen Zugriff hat(haben). Allerdings k=C3=B6nn= en die betreffende(n) Gruppe(n) auf den Linkwert zugreifen. Ein Klick auf d= en Link verursacht f=C3=BCr diese Gruppe(n) den "<strong>Fehler 403</strong= >". +org.jahia.engines.shared.BigText_Field.wrongKeys =3D Das Feld enth=C3=A4lt= einen Link auf die Seite mit dem ung=C3=BCltigen URL-Schl=C3=BCssel [<stro= ng>{0}</strong>]. Der URL-Schl=C3=BCssel ist mit keiner Seite verkn=C3=BCpf= t. = org.jahia.engines.rights.ManageRights.future403warning =3D Wenn Sie die LE= SERECHTE auf dieser Seite f=C3=BCr Benutzer der Gruppe(n) [<strong>{1}</str= ong>] aufheben, erhalten die Benutzer den <strong>Fehler 403</strong>, wenn= sie dem Link auf Seite [<strong>{1}</strong>] folgen. Er enth=C3=A4lt ein = BigText-Feld mit einem Link zur aktuellen Seite. org.jahia.engines.rights.ManageRights.futureChild403warning =3D Wenn Sie d= ie Vererbungseinstellungen auf dieser Seite aufheben, erhalten Benutzer der= Gruppe(n) [<strong>{1}</strong>] den <strong>Fehler 403</strong>, wenn sie= dem Link auf Seite [<strong>{1}</strong>] folgen. Er enth=C3=A4lt ein BigT= ext-Feld mit einem Link zur Unterseite [<strong>{2}</strong>] der aktuellen= Seite. Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResou= rces_en.properties URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP= -BRANCH/core/src/conf/java/JahiaMessageResources_en.properties&rev=3D18917&= repname=3Djahia =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources_e= n.properties (original) +++ branches/JAHIA-5-0-SP-BRANCH/core/src/conf/java/JahiaMessageResources_e= n.properties Wed Oct 17 18:47:29 2007 @@ -319,12 +319,12 @@ org.jahia.engines.workflow.pageNotApplicable =3D Page ({0}) N/A in {= 1} org.jahia.engines.workflow.pageNotExisting =3D Page does not exist = -org.jahia.engines.shared.BigText_Field.stagingWarning =3D Page [<strong>{0= }</strong>] is in state "<strong>staging</strong>" and has never been valid= ated, which will cause a "<strong>403 Error</strong>" in "Live" mode, if th= e link is followed. -org.jahia.engines.shared.BigText_Field.markForDeleteWarning =3D Page [<str= ong>{0}</strong>] is in state "<strong>markForDelete</strong>" which will c= ause a "<strong>404 Error</strong>" after validation, if the link is follow= ed. -org.jahia.engines.shared.BigText_Field.approvalWarning =3D Page [<strong>{= 0}</strong>] in language [<strong>{1}</strong>] is in state "<strong>waitin= g For Approval</strong>" which might cause a "<strong>404 Error</strong>", = if the link is followed. -org.jahia.engines.shared.BigText_Field.notExistingWarning =3D Page [<stron= g>{0}</strong>] is not reachable which will cause a "<strong>404 Error</str= ong>", if the link is followed. -org.jahia.engines.shared.BigText_Field.lessAccessWarning =3D Page [<strong= >{0}</strong>] cannot be accessed by group(s) [<strong>{1}</strong>] which = can however access the link value. A click on the link will cause a "<stron= g>403 Error</strong>" for this(those) group(s). -org.jahia.engines.shared.BigText_Field.wrongKeys =3D URL key [<strong>{0}<= /strong>] is invalid. It is not linked to any page. +org.jahia.engines.shared.BigText_Field.stagingWarning =3D Field contains a= link to the page [<strong>{0}</strong>], which is in the "<strong>staging<= /strong>" state and has never been validated. That will cause a "<strong>40= 3 Error</strong>" in "Live" mode, if the link is followed. +org.jahia.engines.shared.BigText_Field.markForDeleteWarning =3D Field cont= ains a link to the page [<strong>{0}</strong>], which is in the "<strong>ma= rked for delete</strong>" state. That will cause a "<strong>404 Error</stro= ng>" after validation, if the link is followed. +org.jahia.engines.shared.BigText_Field.approvalWarning =3D Field contains = a link to the page [<strong>{0}</strong>] in language [<strong>{1}</strong>= ], which is in the "<strong>waiting for approval</strong>" state. That migh= t cause a "<strong>404 Error</strong>", if the link is followed. +org.jahia.engines.shared.BigText_Field.notExistingWarning =3D Field contai= ns a link to the page [<strong>{0}</strong>], which is not reachable. That = will cause a "<strong>404 Error</strong>", if the link is followed. +org.jahia.engines.shared.BigText_Field.lessAccessWarning =3D Field contain= s a link to the page [<strong>{0}</strong>], which cannot be accessed by gr= oup(s) [<strong>{1}</strong>] that can however access the link value. A cli= ck on the link will cause a "<strong>403 Error</strong>" for this(those) gr= oup(s). +org.jahia.engines.shared.BigText_Field.wrongKeys =3D Field contains a link= to the page with invalid URL key [<strong>{0}</strong>]. This key is not l= inked to any page. = org.jahia.engines.rights.ManageRights.future403warning =3D By removing the= READ rights on this page for users of group(s) [<strong>{0}</strong>], the= y will get a "<strong>403 Error</strong>" if they follow the link on page [= <strong>{1}</strong>]. It contains a BigText field containing a link to the= current page. org.jahia.engines.rights.ManageRights.futureChild403warning =3D By cutting= the inheritance on this page, users of group(s) [<strong>{0}</strong>] wil= l get a "<strong>403 Error</strong>" if they follow the link on page [<stro= ng>{1}</strong>]. It contains a BigText field containing a link to a subpag= e [<strong>{2}</strong>] of the current page. Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/engines/shar= ed/BigText_Field.java URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP= -BRANCH/core/src/java/org/jahia/engines/shared/BigText_Field.java&rev=3D189= 17&repname=3Djahia =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/engines/shared/Big= Text_Field.java (original) +++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/engines/shared/Big= Text_Field.java Wed Oct 17 18:47:29 2007 @@ -851,13 +851,14 @@ // For each page referenced in a hardcoded link while (ite.hasNext()) { final int pid =3D ((Integer) ite.next()).intValue(); + String pageId =3D Integer.toString(pid); final ContentPage page; try { page =3D ContentPage.getPage(pid); } catch (JahiaPageNotFoundException e) { final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Field.notExi= stingWarning", - new String[]{Integer.toString(pid)}); + pageId); result.add("BigText.notExisting", msg); continue; } @@ -865,19 +866,23 @@ if (page =3D=3D null) { final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Field.notExi= stingWarning", - new String[]{Integer.toString(pid)}); + pageId); result.add("BigText.notExisting", msg); continue; } + String pageTitle =3D page.getTitle(jParams.getEntryLoadReq= uest()); + pageTitle =3D pageTitle !=3D null ? pageTitle : "N.A."; + pageId =3D new StringBuffer(pageTitle.length() + 16).appen= d( + pageTitle).append(" (id=3D").append(pid).append(")= ") + .toString(); = final String noAccess =3D getFieldGroupsNotHavingAccessOnP= ageAsString( pid, theField, jParams, engineMap); = if (noAccess !=3D null && noAccess.length() > 0) { - final String[] values =3D {Integer.toString(pid), noAc= cess}; final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Field.lessAc= cessWarning", - values); + new String[] {pageId, noAccess}); result.add("BigText.staging", msg); } = @@ -902,7 +907,7 @@ if (page.getActiveVersionID() <=3D 0) { final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Fiel= d.stagingWarning", - new String[]{Integer.toString(pid)}); + pageId); result.add("BigText.staging", msg); = } @@ -910,15 +915,14 @@ } else if ("markForDeleted".equals(state)) { final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Field.ma= rkForDeleteWarning", - new String[]{Integer.toString(pid)}); + pageId); result.add("BigText.markForDeleted", msg); = } else if ("waiting".equals(state)) { if (page.getActiveVersionID() <=3D 0) { - final String[] values =3D {Integer.toString(pi= d), lang}; final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Fiel= d.approvalWarning", - values); + new String[] {pageId, new Locale(lang)= .getDisplayLanguage(oldLoc)}); result.add("BigText.waiting", msg); = } @@ -937,10 +941,9 @@ if (wrongKeys.size() > 0) { final Iterator ite =3D wrongKeys.iterator(); while (ite.hasNext()) { - final String urlKey =3D (String) ite.next(); final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Field.wrongKeys", - new String[]{urlKey}); + (String) ite.next()); result.add("BigText.wrongURLKeys", msg); } } Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/fie= lds/ContentBigTextField.java URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP= -BRANCH/core/src/java/org/jahia/services/fields/ContentBigTextField.java&re= v=3D18917&repname=3Djahia =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/fields/Co= ntentBigTextField.java (original) +++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/fields/Co= ntentBigTextField.java Wed Oct 17 18:47:29 2007 @@ -306,6 +306,7 @@ final Iterator pids =3D theField.getInternalLinks().it= erator(); while (pids.hasNext()) { final int pid =3D ((Integer) pids.next()).intValue= (); + String pageId =3D Integer.toString(pid); final ContentPage page; try { page =3D ContentPage.getPage(pid); @@ -314,7 +315,7 @@ if (! stateModifContext.isModifiedObject(key))= { final EngineMessage msg =3D new EngineMess= age( "org.jahia.engines.shared.BigText_= Field.notExistingWarning", - Integer.toString(pid)); + pageId); final URLIntegrityValidForActivationResult= s activationResults =3D new URLIntegrityValidForActivation= Results(ContentFieldKey.FIELD_TYPE, getID(), jParams.getLocale= ().toString(), @@ -329,7 +330,7 @@ if (! stateModifContext.isModifiedObject(key))= { final EngineMessage msg =3D new EngineMess= age( "org.jahia.engines.shared.BigText_= Field.notExistingWarning", - Integer.toString(pid)); + pageId); final URLIntegrityValidForActivationResult= s activationResults =3D new URLIntegrityValidForActivation= Results(ContentFieldKey.FIELD_TYPE, getID(), jParams.getLocale= ().toString(), @@ -338,6 +339,11 @@ } continue; } + String pageTitle =3D page.getTitle(jParams.getEntr= yLoadRequest()); + pageTitle =3D pageTitle !=3D null ? pageTitle : "N= .A."; + pageId =3D new StringBuffer(pageTitle.length() + 1= 6).append( + pageTitle).append(" (id=3D").append(pid).a= ppend(")") + .toString(); = final HashMap engineMap =3D new HashMap(1); final JahiaContainer container =3D ServicesRegistr= y.getInstance(). @@ -350,10 +356,9 @@ pid, theField, jParams, engineMap); = if (noAccess !=3D null && noAccess.length() > 0) { - final String[] values =3D {Integer.toString(pi= d), noAccess}; final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Fiel= d.lessAccessWarning", - values); + new String[] {pageId, noAccess}); final URLIntegrityValidForActivationResults ac= tivationResults =3D new URLIntegrityValidForActivationResu= lts(ContentFieldKey.FIELD_TYPE, getID(), jParams.getLocale().t= oString(), @@ -371,7 +376,7 @@ if (page.getActiveVersionID() <=3D 0 && ! stat= eModifContext.isModifiedObject(key)) { final EngineMessage msg =3D new EngineMess= age( "org.jahia.engines.shared.BigText_= Field.stagingWarning", - Integer.toString(pid)); + pageId); final URLIntegrityValidForActivationResult= s activationResults =3D new URLIntegrityValidForActivation= Results(ContentFieldKey.FIELD_TYPE, getID(), jParams.getLocale= ().toString(), @@ -382,7 +387,7 @@ } else if ("markForDeleted".equals(state)) { final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Fiel= d.markForDeleteWarning", - Integer.toString(pid)); + pageId); final URLIntegrityValidForActivationResults ac= tivationResults =3D new URLIntegrityValidForActivationResu= lts(ContentFieldKey.FIELD_TYPE, getID(), jParams.getLocale().t= oString(), @@ -394,7 +399,7 @@ if (page.getActiveVersionID() <=3D 0 && ! stat= eModifContext.isModifiedObject(key)) { final EngineMessage msg =3D new EngineMess= age( "org.jahia.engines.shared.BigText_= Field.approvalWarning", - Integer.toString(pid)); + new String[] {pageId, jParams.getL= ocale().getDisplayLanguage(currentLocale)}); final URLIntegrityValidForActivationResult= s activationResults =3D new URLIntegrityValidForActivation= Results(ContentFieldKey.FIELD_TYPE, getID(), jParams.getLocale= ().toString(), @@ -414,10 +419,9 @@ = final Iterator invalidKeys =3D theField.getWrongURLKey= s().iterator(); while (invalidKeys.hasNext()) { - final String invalidKey =3D (String) invalidKeys.n= ext(); final EngineMessage msg =3D new EngineMessage( "org.jahia.engines.shared.BigText_Field.wr= ongKeys", - invalidKey); + (String) invalidKeys.next()); final URLIntegrityValidForActivationResults activa= tionResults =3D new URLIntegrityValidForActivationResults(= ContentFieldKey.FIELD_TYPE, getID(), jParams.getLocale().toStr= ing(), @@ -432,18 +436,24 @@ = if (site.getWAIComplianceCheck() =3D=3D 1) { try { - logger.debug("WAI check on: " + theField); + if (logger.isDebugEnabled()) { + logger.debug("WAI check on: " + theField); + } final EngineValidationHelper evh =3D WAIValidator.getI= nstance(). validate("<html>" + theField.getValue() + "</h= tml>"); = - logger.debug("EVH: " + evh); + if (logger.isDebugEnabled()) { + logger.debug("EVH: " + evh); + } = final Iterator ite =3D evh.getErrors().iterator(); while (ite.hasNext()) { final ValidationError error =3D (ValidationError) = ite.next(); final EngineMessage msg =3D new EngineMessage( error.getRessourceBundleProp(), error.getV= alues()); - logger.debug("Adding 1 error: " + msg); + if (logger.isDebugEnabled()) { + logger.debug("Adding 1 error: " + msg); + } final WAIValidForActivationResults activationResul= ts =3D new WAIValidForActivationResults(ContentFi= eldKey.FIELD_TYPE, getID(), jParams.getLocale().toStr= ing(), msg); _______________________________________________ cvs_list mailing list [email protected] http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list
