From fdesbois@users.nuiton.org Thu Jun 10 19:56:01 2010 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r12 - in trunk/nuiton-tapestry-extra/src/main: java/org/nuiton/web/tapestry5/components resources/org/nuiton/web/tapestry5/components Date: Thu, 10 Jun 2010 19:56:01 +0200 Message-ID: <20100610175601.0DF1915926@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1745932038128650135==" --===============1745932038128650135== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2010-06-10 19:56:00 +0200 (Thu, 10 Jun 2010) New Revision: 12 Url: http://nuiton.org/repositories/revision/nuiton-web/12 Log: Add SubForm component Added: trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compone= nts/SubForm.java trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry5/co= mponents/SubForm.tml Added: trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/com= ponents/SubForm.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compon= ents/SubForm.java (rev 0) +++ trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compon= ents/SubForm.java 2010-06-10 17:56:00 UTC (rev 12) @@ -0,0 +1,37 @@ +package org.nuiton.web.tapestry5.components; + +import org.apache.tapestry5.Block; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.slf4j.Logger; + +/** + * Created: 14 mai 2010 + * + * @author fdesbois + * @version $Id: SubForm.java 3003 2010-05-19 18:25:58Z fdesbois $ + */ +public class SubForm { + + @Parameter + private boolean visible; + + @Inject + private Logger logger; + + @Inject + private Block formBlock; + + @Inject + private Block noFormBlock; + + public Block getActiveBlock() { + if (logger.isDebugEnabled()) { + logger.debug("form already visible : " + visible); + } + if (visible) { + return formBlock; + } + return noFormBlock; + } +} \ No newline at end of file Added: trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry= 5/components/SubForm.tml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry5/c= omponents/SubForm.tml (rev 0) +++ trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry5/c= omponents/SubForm.tml 2010-06-10 17:56:00 UTC (rev 12) @@ -0,0 +1,14 @@ + + + + + +
+ + +
+ + + + + \ No newline at end of file --===============1745932038128650135==-- From fdesbois@users.nuiton.org Sat Jun 12 17:05:57 2010 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r13 - in trunk/nuiton-tapestry-extra/src/main: java/org/nuiton/web/tapestry5/mixins resources/org/nuiton/web/tapestry5/mixins Date: Sat, 12 Jun 2010 17:05:57 +0200 Message-ID: <20100612150557.904841590E@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6035325295702302476==" --===============6035325295702302476== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2010-06-12 17:05:57 +0200 (Sat, 12 Jun 2010) New Revision: 13 Url: http://nuiton.org/repositories/revision/nuiton-web/13 Log: Update confirm mixin to use condition Modified: trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/mixins/= Confirm.java trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry5/mi= xins/confirm.js Modified: trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/= mixins/Confirm.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/mixins= /Confirm.java 2010-06-10 17:56:00 UTC (rev 12) +++ trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/mixins= /Confirm.java 2010-06-12 15:05:57 UTC (rev 13) @@ -25,6 +25,9 @@ @Parameter(value =3D "Are you sure?", defaultPrefix =3D BindingConstants= .MESSAGE) private String message; =20 + @Parameter(value =3D "true") + private boolean condition; + @Inject private RenderSupport renderSupport; =20 @@ -37,8 +40,8 @@ @AfterRender public void afterRender() { if (!wDisabled) { - renderSupport.addScript(String.format("new Confirm('%s', '%s');= ", - element.getClientId(), message.replace("'", "\\'"))); + renderSupport.addScript(String.format("new Confirm('%s', '%s', = %b);", + element.getClientId(), message.replace("'", "\\'"), con= dition)); } } =20 Modified: trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapes= try5/mixins/confirm.js =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry5/m= ixins/confirm.js 2010-06-10 17:56:00 UTC (rev 12) +++ trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry5/m= ixins/confirm.js 2010-06-12 15:05:57 UTC (rev 13) @@ -6,15 +6,18 @@ * element : Element DOM depuis lequel le dialogue de confirmation va s'= ouvrir * message : Message =C3=A0 afficher dans la bo=C3=AEte de dialogue */ - initialize: function(element, message) { + initialize: function(element, message, condition) { this.message =3D message; + this.condition =3D condition; Event.observe($(element), 'click', this.doConfirm.bindAsEventListene= r(this)); }, doConfirm: function(e) { //Tapestry.debug('click ' + element); - if(! confirm(this.message)) { - //Tapestry.debug('STOP ' + e); - Event.stop(e); + if (this.condition) { + if (!confirm(this.message)) { + //Tapestry.debug('STOP ' + e); + Event.stop(e); + } } } }); \ No newline at end of file --===============6035325295702302476==-- From fdesbois@users.nuiton.org Sat Jun 12 21:14:41 2010 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r14 - in trunk: . nuiton-tapestry-extra Date: Sat, 12 Jun 2010 21:14:41 +0200 Message-ID: <20100612191441.2B5B115926@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3273807366184851191==" --===============3273807366184851191== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2010-06-12 21:14:41 +0200 (Sat, 12 Jun 2010) New Revision: 14 Url: http://nuiton.org/repositories/revision/nuiton-web/14 Log: [maven-release-plugin] prepare release nuiton-web-0.1 Modified: trunk/nuiton-tapestry-extra/pom.xml trunk/pom.xml Modified: trunk/nuiton-tapestry-extra/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/pom.xml 2010-06-12 15:05:57 UTC (rev 13) +++ trunk/nuiton-tapestry-extra/pom.xml 2010-06-12 19:14:41 UTC (rev 14) @@ -10,7 +10,7 @@ org.nuiton nuiton-web - 0.1-SNAPSHOT + 0.1 =20 org.nuiton.web Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2010-06-12 15:05:57 UTC (rev 13) +++ trunk/pom.xml 2010-06-12 19:14:41 UTC (rev 14) @@ -14,7 +14,7 @@ =20 nuiton-web - 0.1-SNAPSHOT + 0.1 =20 nuiton-tapestry-extra @@ -166,9 +166,9 @@ =20 - scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk - scm:svn:http://svn.nuiton.org/svn/nuiton-web/tr= unk - http://www.nuiton.org/repositories/browse/nuiton-web/trunk + scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton= -web-0.1 + scm:svn:http://svn.nuiton.org/svn/nuiton-web/ta= gs/nuiton-web-0.1 + http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuito= n-web-0.1 =20 --===============3273807366184851191==-- From fdesbois@users.nuiton.org Sat Jun 12 21:14:47 2010 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r15 - tags Date: Sat, 12 Jun 2010 21:14:47 +0200 Message-ID: <20100612191447.5D66615926@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3606447642174729845==" --===============3606447642174729845== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: fdesbois Date: 2010-06-12 21:14:47 +0200 (Sat, 12 Jun 2010) New Revision: 15 Url: http://nuiton.org/repositories/revision/nuiton-web/15 Log: [maven-release-plugin] copy for tag nuiton-web-0.1 Added: tags/nuiton-web-0.1/ --===============3606447642174729845==-- From fdesbois@users.nuiton.org Sat Jun 12 21:14:53 2010 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r16 - in trunk: . nuiton-tapestry-extra Date: Sat, 12 Jun 2010 21:14:53 +0200 Message-ID: <20100612191453.62BCD15926@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5822972086542247424==" --===============5822972086542247424== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2010-06-12 21:14:53 +0200 (Sat, 12 Jun 2010) New Revision: 16 Url: http://nuiton.org/repositories/revision/nuiton-web/16 Log: [maven-release-plugin] prepare for next development iteration Modified: trunk/nuiton-tapestry-extra/pom.xml trunk/pom.xml Modified: trunk/nuiton-tapestry-extra/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/pom.xml 2010-06-12 19:14:47 UTC (rev 15) +++ trunk/nuiton-tapestry-extra/pom.xml 2010-06-12 19:14:53 UTC (rev 16) @@ -10,7 +10,7 @@ org.nuiton nuiton-web - 0.1 + 0.2-SNAPSHOT =20 org.nuiton.web Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2010-06-12 19:14:47 UTC (rev 15) +++ trunk/pom.xml 2010-06-12 19:14:53 UTC (rev 16) @@ -14,7 +14,7 @@ =20 nuiton-web - 0.1 + 0.2-SNAPSHOT =20 nuiton-tapestry-extra @@ -166,9 +166,9 @@ =20 - scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton= -web-0.1 - scm:svn:http://svn.nuiton.org/svn/nuiton-web/ta= gs/nuiton-web-0.1 - http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuito= n-web-0.1 + scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk + scm:svn:http://svn.nuiton.org/svn/nuiton-web/tr= unk + http://www.nuiton.org/repositories/browse/nuiton-web/trunk =20 --===============5822972086542247424==-- From fdesbois@users.nuiton.org Thu Jun 17 15:46:23 2010 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r17 - trunk/nuiton-tapestry-extra Date: Thu, 17 Jun 2010 15:46:23 +0200 Message-ID: <20100617134623.7991315913@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2218256437501645841==" --===============2218256437501645841== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: fdesbois Date: 2010-06-17 15:46:23 +0200 (Thu, 17 Jun 2010) New Revision: 17 Url: http://nuiton.org/repositories/revision/nuiton-web/17 Log: Correction groupId for nuiton-tapestry-estra Modified: trunk/nuiton-tapestry-extra/pom.xml Modified: trunk/nuiton-tapestry-extra/pom.xml =================================================================== --- trunk/nuiton-tapestry-extra/pom.xml 2010-06-12 19:14:53 UTC (rev 16) +++ trunk/nuiton-tapestry-extra/pom.xml 2010-06-17 13:46:23 UTC (rev 17) @@ -13,7 +13,7 @@ 0.2-SNAPSHOT - org.nuiton.web + org.nuiton.nuiton-web nuiton-tapestry-extra --===============2218256437501645841==-- From tchemit@users.nuiton.org Sat Jun 19 20:57:11 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r18 - trunk Date: Sat, 19 Jun 2010 20:57:11 +0200 Message-ID: <20100619185711.9269C15926@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2805566239318446244==" --===============2805566239318446244== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-06-19 20:57:11 +0200 (Sat, 19 Jun 2010) New Revision: 18 Url: http://nuiton.org/repositories/revision/nuiton-web/18 Log: Utilisation de mavenpom4redmine 2.2 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-06-17 13:46:23 UTC (rev 17) +++ trunk/pom.xml 2010-06-19 18:57:11 UTC (rev 18) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.1.5 + 2.2 nuiton-web --===============2805566239318446244==-- From tchemit@users.nuiton.org Sun Jun 27 08:36:06 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r19 - trunk Date: Sun, 27 Jun 2010 08:36:06 +0200 Message-ID: <20100627063606.867A115920@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9216999149222957914==" --===============9216999149222957914== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-06-27 08:36:06 +0200 (Sun, 27 Jun 2010) New Revision: 19 Url: http://nuiton.org/repositories/revision/nuiton-web/19 Log: Utilisation de mavenpom4redmine 2.2.1 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-06-19 18:57:11 UTC (rev 18) +++ trunk/pom.xml 2010-06-27 06:36:06 UTC (rev 19) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2 + 2.2.1 nuiton-web --===============9216999149222957914==-- From tchemit@users.nuiton.org Thu Jul 1 14:31:34 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r20 - trunk Date: Thu, 01 Jul 2010 14:31:34 +0200 Message-ID: <20100701123134.47F4E15926@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7652327904680334838==" --===============7652327904680334838== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-07-01 14:31:34 +0200 (Thu, 01 Jul 2010) New Revision: 20 Url: http://nuiton.org/repositories/revision/nuiton-web/20 Log: Utilisation de mavenpom4redmine 2.2.2 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-06-27 06:36:06 UTC (rev 19) +++ trunk/pom.xml 2010-07-01 12:31:34 UTC (rev 20) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2.1 + 2.2.2 nuiton-web --===============7652327904680334838==-- From tchemit@users.nuiton.org Thu Jul 1 15:16:16 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r21 - trunk Date: Thu, 01 Jul 2010 15:16:16 +0200 Message-ID: <20100701131616.B1974159F1@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0434601487048082284==" --===============0434601487048082284== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-07-01 15:16:16 +0200 (Thu, 01 Jul 2010) New Revision: 21 Url: http://nuiton.org/repositories/revision/nuiton-web/21 Log: Utilisation de mavenpom4labs 2.2.2.1 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-07-01 12:31:34 UTC (rev 20) +++ trunk/pom.xml 2010-07-01 13:16:16 UTC (rev 21) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2.2 + 2.2.2.1 nuiton-web --===============0434601487048082284==-- From tchemit@users.nuiton.org Wed Aug 11 16:46:55 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r22 - trunk Date: Wed, 11 Aug 2010 16:46:55 +0200 Message-ID: <20100811144655.4090015A05@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6527767952380812230==" --===============6527767952380812230== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-08-11 16:46:55 +0200 (Wed, 11 Aug 2010) New Revision: 22 Url: http://nuiton.org/repositories/revision/nuiton-web/22 Log: Utilisation de mavenpom4redmine 2.2.3 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-07-01 13:16:16 UTC (rev 21) +++ trunk/pom.xml 2010-08-11 14:46:55 UTC (rev 22) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2.2.1 + 2.2.3 nuiton-web --===============6527767952380812230==-- From tchemit@users.nuiton.org Sun Aug 29 16:21:31 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r23 - trunk Date: Sun, 29 Aug 2010 16:21:31 +0200 Message-ID: <20100829142131.8537A15A7F@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3862297677614274383==" --===============3862297677614274383== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-08-29 16:21:31 +0200 (Sun, 29 Aug 2010) New Revision: 23 Url: http://nuiton.org/repositories/revision/nuiton-web/23 Log: Utilisation de mavenpom4redmine 2.2.4 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-08-11 14:46:55 UTC (rev 22) +++ trunk/pom.xml 2010-08-29 14:21:31 UTC (rev 23) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2.3 + 2.2.4 nuiton-web --===============3862297677614274383==-- From tchemit@users.nuiton.org Thu Sep 9 11:30:58 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r24 - trunk Date: Thu, 09 Sep 2010 11:30:58 +0200 Message-ID: <20100909093058.9B51115A87@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5622130360782421362==" --===============5622130360782421362== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-09-09 11:30:58 +0200 (Thu, 09 Sep 2010) New Revision: 24 Url: http://nuiton.org/repositories/revision/nuiton-web/24 Log: Utilisation de mavenpom4redmine 2.2.5 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-08-29 14:21:31 UTC (rev 23) +++ trunk/pom.xml 2010-09-09 09:30:58 UTC (rev 24) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2.4 + 2.2.5 nuiton-web --===============5622130360782421362==-- From tchemit@users.nuiton.org Wed Sep 29 10:11:29 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r25 - trunk Date: Wed, 29 Sep 2010 10:11:29 +0200 Message-ID: <20100929081129.B9ED365BCD@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8328811407328223441==" --===============8328811407328223441== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-09-29 10:11:29 +0200 (Wed, 29 Sep 2010) New Revision: 25 Url: http://nuiton.org/repositories/revision/nuiton-web/25 Log: Utilisation de mavenpom4redmine 2.2.6 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-09 09:30:58 UTC (rev 24) +++ trunk/pom.xml 2010-09-29 08:11:29 UTC (rev 25) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2.5 + 2.2.6 nuiton-web --===============8328811407328223441==-- From tchemit@users.nuiton.org Sun Oct 3 17:56:55 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r26 - trunk Date: Sun, 03 Oct 2010 17:56:55 +0200 Message-ID: <20101003155655.1C5D515A8A@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3342234524401671534==" --===============3342234524401671534== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-03 17:56:55 +0200 (Sun, 03 Oct 2010) New Revision: 26 Url: http://nuiton.org/repositories/revision/nuiton-web/26 Log: Update mavenpom4redmine to 2.3. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-09-29 08:11:29 UTC (rev 25) +++ trunk/pom.xml 2010-10-03 15:56:55 UTC (rev 26) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.2.6 + 2.3 nuiton-web --===============3342234524401671534==-- From tchemit@users.nuiton.org Sat Oct 9 01:51:47 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r27 - trunk Date: Sat, 09 Oct 2010 01:51:47 +0200 Message-ID: <20101008235147.6AC2E15ACF@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4968336414380921251==" --===============4968336414380921251== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-09 01:51:47 +0200 (Sat, 09 Oct 2010) New Revision: 27 Url: http://nuiton.org/repositories/revision/nuiton-web/27 Log: Update mavenpom4redmine to 2.3.1. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-03 15:56:55 UTC (rev 26) +++ trunk/pom.xml 2010-10-08 23:51:47 UTC (rev 27) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.3 + 2.3.1 nuiton-web --===============4968336414380921251==-- From tchemit@users.nuiton.org Sun Oct 17 03:39:18 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r28 - trunk Date: Sun, 17 Oct 2010 03:39:18 +0200 Message-ID: <20101017013918.D6E5E75F86@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0216089007986915909==" --===============0216089007986915909== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-17 03:39:18 +0200 (Sun, 17 Oct 2010) New Revision: 28 Url: http://nuiton.org/repositories/revision/nuiton-web/28 Log: Update mavenpom4redmine to 2.3.2. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-08 23:51:47 UTC (rev 27) +++ trunk/pom.xml 2010-10-17 01:39:18 UTC (rev 28) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.3.1 + 2.3.2 nuiton-web --===============0216089007986915909==-- From tchemit@users.nuiton.org Tue Oct 26 14:13:59 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r29 - trunk Date: Tue, 26 Oct 2010 14:13:59 +0200 Message-ID: <20101026121359.0111F15AD3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1850123860371418985==" --===============1850123860371418985== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-26 14:13:58 +0200 (Tue, 26 Oct 2010) New Revision: 29 Url: http://nuiton.org/repositories/revision/nuiton-web/29 Log: use mavenpom 2.4-SNAPSHOT use camelCase style for version properties use default libraries version from mavenpom Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-17 01:39:18 UTC (rev 28) +++ trunk/pom.xml 2010-10-26 12:13:58 UTC (rev 29) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.3.2 + 2.4-SNAPSHOT nuiton-web @@ -26,17 +26,16 @@ commons-lang commons-lang - 2.4 org.nuiton nuiton-utils - ${nuiton-utils.version} + ${nuitonUtilsVersion} org.apache.tapestry tapestry-core - ${tapestry.version} + ${tapestryVersion} compile @@ -60,12 +59,11 @@ junit junit - 4.7 test @@ -119,8 +117,8 @@ nuiton-web - 5.1.0.5 - 1.2.2 + 5.1.0.5 + 1.2.2 en,fr @@ -141,7 +139,7 @@ org.nuiton.jrst doxia-module-jrst - ${jrst.version} + ${jrstPluginVersion} --===============1850123860371418985==-- From tchemit@users.nuiton.org Tue Oct 26 14:58:10 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r30 - trunk Date: Tue, 26 Oct 2010 14:58:10 +0200 Message-ID: <20101026125810.BB4005DFC4@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7317068819638130659==" --===============7317068819638130659== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-26 14:58:10 +0200 (Tue, 26 Oct 2010) New Revision: 30 Url: http://nuiton.org/repositories/revision/nuiton-web/30 Log: fix build (use inheritance from mavenpom for commons libs) Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-26 12:13:58 UTC (rev 29) +++ trunk/pom.xml 2010-10-26 12:58:10 UTC (rev 30) @@ -23,10 +23,10 @@ - + org.nuiton nuiton-utils @@ -61,11 +61,11 @@ tapestry-upload ${tapestryVersion} - + --===============7317068819638130659==-- From tchemit@users.nuiton.org Tue Oct 26 16:59:27 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r31 - trunk Date: Tue, 26 Oct 2010 16:59:27 +0200 Message-ID: <20101026145927.CDAD415AD3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5140151137434693410==" --===============5140151137434693410== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-26 16:59:27 +0200 (Tue, 26 Oct 2010) New Revision: 31 Url: http://nuiton.org/repositories/revision/nuiton-web/31 Log: add svn:ignore Modified: trunk/ Property changes on: trunk ___________________________________________________________________ Added: svn:ignore + target *.ipr *.iws *.iml .project .classpath --===============5140151137434693410==-- From tchemit@users.nuiton.org Tue Oct 26 17:02:02 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r32 - trunk/nuiton-tapestry-extra Date: Tue, 26 Oct 2010 17:02:02 +0200 Message-ID: <20101026150202.2949E15AD4@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1302923716297950336==" --===============1302923716297950336== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-26 17:02:02 +0200 (Tue, 26 Oct 2010) New Revision: 32 Url: http://nuiton.org/repositories/revision/nuiton-web/32 Log: add svn:ignore Modified: trunk/nuiton-tapestry-extra/ Property changes on: trunk/nuiton-tapestry-extra ___________________________________________________________________ Modified: svn:ignore - target + target *.ipr *.iws *.iml .settings .classpath .project --===============1302923716297950336==-- From tchemit@users.nuiton.org Fri Oct 29 10:30:25 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r33 - trunk Date: Fri, 29 Oct 2010 10:30:25 +0200 Message-ID: <20101029083025.0F72415AE3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0432644675696170126==" --===============0432644675696170126== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-10-29 10:30:25 +0200 (Fri, 29 Oct 2010) New Revision: 33 Url: http://nuiton.org/repositories/revision/nuiton-web/33 Log: Update mavenpom4redmine to 2.4. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-26 15:02:02 UTC (rev 32) +++ trunk/pom.xml 2010-10-29 08:30:25 UTC (rev 33) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.4-SNAPSHOT + 2.4 nuiton-web --===============0432644675696170126==-- From tchemit@users.nuiton.org Sun Nov 21 15:31:44 2010 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r34 - trunk Date: Sun, 21 Nov 2010 15:31:44 +0100 Message-ID: <20101121143144.69C3E15C71@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9112258157620365686==" --===============9112258157620365686== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2010-11-21 15:31:44 +0100 (Sun, 21 Nov 2010) New Revision: 34 Url: http://nuiton.org/repositories/revision/nuiton-web/34 Log: Update mavenpom4redmine to 2.4.1. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-10-29 08:30:25 UTC (rev 33) +++ trunk/pom.xml 2010-11-21 14:31:44 UTC (rev 34) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmine - 2.4 + 2.4.1 nuiton-web --===============9112258157620365686==-- From bleny@users.nuiton.org Fri Jan 7 10:58:15 2011 From: bleny@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r35 - in trunk: . nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/components Date: Fri, 07 Jan 2011 10:58:15 +0100 Message-ID: <20110107095815.5613B15BDE@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1912963331035882171==" --===============1912963331035882171== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: bleny Date: 2011-01-07 10:58:15 +0100 (Fri, 07 Jan 2011) New Revision: 35 Url: http://nuiton.org/repositories/revision/nuiton-web/35 Log: update to Tapestry 5.2 ; remove use of a deprecated Tapestry stuff Modified: trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compone= nts/SubmitContext.java trunk/pom.xml Modified: trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/= components/SubmitContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compon= ents/SubmitContext.java 2010-11-21 14:31:44 UTC (rev 34) +++ trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compon= ents/SubmitContext.java 2011-01-07 09:58:15 UTC (rev 35) @@ -24,7 +24,6 @@ import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.EventConstants; import org.apache.tapestry5.MarkupWriter; -import org.apache.tapestry5.RenderSupport; import org.apache.tapestry5.annotations.Environmental; import org.apache.tapestry5.annotations.Events; import org.apache.tapestry5.annotations.Parameter; @@ -34,6 +33,7 @@ import org.apache.tapestry5.services.FormSupport; import org.apache.tapestry5.services.Heartbeat; import org.apache.tapestry5.services.Request; +import org.apache.tapestry5.services.javascript.JavaScriptSupport; =20 /** * Corresponds to <input type=3D"submit">, a client-side element that = can @@ -97,7 +97,7 @@ private Request request; =20 @Inject - private RenderSupport renderSupport; + private JavaScriptSupport javaScriptSupport; =20 private Element element; =20 @@ -188,11 +188,11 @@ this.defer =3D defer; } =20 - void setup(ComponentResources resources, FormSupport formSupport, Heartb= eat heartbeat, RenderSupport renderSupport) { + void setup(ComponentResources resources, FormSupport formSupport, Heartb= eat heartbeat, JavaScriptSupport javaScriptSupport) { this.resources =3D resources; this.formSupport =3D formSupport; this.heartbeat =3D heartbeat; - this.renderSupport =3D renderSupport; + this.javaScriptSupport =3D javaScriptSupport; } =20 /** @@ -204,7 +204,7 @@ */ public String getClientId() { if (clientId =3D=3D null) { - clientId =3D renderSupport.allocateClientId(resources); + clientId =3D javaScriptSupport.allocateClientId(resources); =20 element.forceAttributes("id", clientId); } Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2010-11-21 14:31:44 UTC (rev 34) +++ trunk/pom.xml 2011-01-07 09:58:15 UTC (rev 35) @@ -47,13 +47,13 @@ org.slf4j slf4j-api - 1.5.10 + ${slf4jVersion} compile org.slf4j slf4j-log4j12 - 1.5.10 + ${slf4jVersion} runtime - 5.1.0.5 - 1.2.2 + 5.2.4 + 1.5.3 + 1.6.1 =20 en,fr --===============1912963331035882171==-- From fdesbois@users.nuiton.org Fri Jan 7 11:17:55 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r36 - trunk Date: Fri, 07 Jan 2011 11:17:55 +0100 Message-ID: <20110107101755.B44D715BF3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7351577388302329658==" --===============7351577388302329658== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2011-01-07 11:17:55 +0100 (Fri, 07 Jan 2011) New Revision: 36 Url: http://nuiton.org/repositories/revision/nuiton-web/36 Log: clean pom Modified: trunk/pom.xml Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/pom.xml 2011-01-07 10:17:55 UTC (rev 36) @@ -1,173 +1,170 @@ - + =20 - 4.0.0 + 4.0.0 =20 - - - + + + =20 - + + org.nuiton + mavenpom4redmine + 2.4.1 + + + nuiton-web + 0.2-SNAPSHOT + + + nuiton-tapestry-extra + + + + + + + + org.nuiton - mavenpom4redmine - 2.4.1 - + nuiton-utils + ${nuitonUtilsVersion} + =20 - nuiton-web - 0.2-SNAPSHOT + + org.apache.tapestry + tapestry-core + ${tapestryVersion} + compile + + + jboss + javassist + + + =20 - - nuiton-tapestry-extra - - + + org.slf4j + slf4j-api + ${slf4jVersion} + compile + =20 - - - - - org.nuiton - nuiton-utils - ${nuitonUtilsVersion} - - - org.apache.tapestry - tapestry-core - ${tapestryVersion} - compile - - - jboss - javassist - - - - - org.slf4j - slf4j-api - ${slf4jVersion} - compile - - - org.slf4j - slf4j-log4j12 - ${slf4jVersion} - runtime - - - - - + + org.slf4j + slf4j-log4j12 + ${slf4jVersion} + runtime + =20 - - - + =20 - Nuiton-web - Common ressources for web applications - 2010 - http://maven-site.nuiton.org/nuiton-web/ + =20 - - - - fdesbois - Florian DESBOIS - florian.desbois@gmail.com - ALMA - Code Lutin - http:/alma.univ-nantes.fr - +1 - - Chef de Projet - Analyste - D=C3=A9veloppeur - - - - tchemit - Tony Chemit - chemit@codelutin.com - CodeLutin - +2 - - D=C3=A9veloppeur - - - + + + =20 - - - + Nuiton-web + Common ressources for web applications + 2010 + http://maven-site.nuiton.org/nuiton-web/ =20 - pom + + + + fdesbois + Florian DESBOIS + fdesbois@codelutin.com + Code Lutin + +2 + + D=C3=A9veloppeur + + + + tchemit + Tony Chemit + chemit@codelutin.com + CodeLutin + +2 + + D=C3=A9veloppeur + + + =20 - + + + =20 - - nuiton-web + pom =20 - - 5.2.4 - 1.5.3 - 1.6.1 + =20 - - en,fr + + nuiton-web =20 - - lgpl_v3 + + 5.2.4 + 1.5.3 + 1.6.1 =20 - + + 5.1.0.5 + 1.2.2 =20 - + + en,fr =20 - - + + lgpl_v3 =20 - - maven-site-plugin - - - org.nuiton.jrst - doxia-module-jrst - ${jrstPluginVersion} - - - - - + =20 - - - src/main/resources - true - - - + =20 - - - true - + + =20 - - - + + maven-site-plugin + + + org.nuiton.jrst + doxia-module-jrst + ${jrstPluginVersion} + + + + + =20 - - scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk - scm:svn:http://svn.nuiton.org/svn/nuiton-web/tr= unk - http://www.nuiton.org/repositories/browse/nuiton-web/trunk - + + + src/main/resources + true + + + =20 + + + true + + + + + + + + scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk + scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk + + http://www.nuiton.org/repositories/browse/nuiton-web/trunk + + --===============7351577388302329658==-- From fdesbois@users.nuiton.org Fri Jan 7 11:24:35 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r37 - trunk Date: Fri, 07 Jan 2011 11:24:35 +0100 Message-ID: <20110107102435.909C815BDE@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2273086578526942735==" --===============2273086578526942735== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: fdesbois Date: 2011-01-07 11:24:35 +0100 (Fri, 07 Jan 2011) New Revision: 37 Url: http://nuiton.org/repositories/revision/nuiton-web/37 Log: - Rename nuiton-web artifact to nuiton-web-parent - Rename nuiton-tapestry-extra to nuiton-tapestry - #1199 : deprecate SubForm component Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-07 10:17:55 UTC (rev 36) +++ trunk/pom.xml 2011-01-07 10:24:35 UTC (rev 37) @@ -15,11 +15,11 @@ 2.4.1 - nuiton-web - 0.2-SNAPSHOT + nuiton-web-parent + 1.0-SNAPSHOT - nuiton-tapestry-extra + nuiton-tapestry @@ -52,7 +52,6 @@ ${slf4jVersion} compile - org.slf4j slf4j-log4j12 --===============2273086578526942735==-- From fdesbois@users.nuiton.org Fri Jan 7 11:26:00 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r38 - in trunk: . nuiton-tapestry nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/components Date: Fri, 07 Jan 2011 11:26:00 +0100 Message-ID: <20110107102600.0691515BF3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2885688175675982326==" --===============2885688175675982326== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2011-01-07 11:25:59 +0100 (Fri, 07 Jan 2011) New Revision: 38 Url: http://nuiton.org/repositories/revision/nuiton-web/38 Log: rename nuiton-tapestry-extra to nuiton-tapestry Added: trunk/nuiton-tapestry/ Removed: trunk/nuiton-tapestry-extra/ Modified: trunk/nuiton-tapestry/pom.xml trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/R= equiresAuthentication.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/Fe= edBack.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/Su= bForm.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstract= MappedGridDataSource.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confir= m.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneUp= dater.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abst= ractAuthenticationFilter.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Form= atBinding.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Form= atBindingFactory.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nuit= onModule.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Serv= iceAuthentication.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Serv= iceAuthenticationImpl.java trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/componen= ts/SubForm.tml Modified: trunk/nuiton-tapestry/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/pom.xml 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/pom.xml 2011-01-07 10:25:59 UTC (rev 38) @@ -1,87 +1,94 @@ - + =20 - 4.0.0 + 4.0.0 =20 - - - + + + =20 - - org.nuiton - nuiton-web - 0.2-SNAPSHOT - + + org.nuiton + nuiton-web-parent + 1.0-SNAPSHOT + =20 - org.nuiton.nuiton-web - nuiton-tapestry-extra + nuiton-tapestry =20 + =20 - - - commons-lang - commons-lang - - - org.nuiton - nuiton-utils - - - org.apache.tapestry - tapestry-core - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - - - junit - junit - - + + commons-lang + commons-lang + =20 - - - + + org.nuiton + nuiton-utils + =20 - Nuiton-web :: Tapestry Extra - Extra classes for Tapestry based applications + + org.apache.tapestry + tapestry-core + =20 - - - + + org.slf4j + slf4j-api + =20 - jar + + org.slf4j + slf4j-log4j12 + =20 + + junit + junit + =20 - - - - org.apache.maven.plugins - maven-jar-plugin - - - true - true - - - - org.nuiton.web.tapestry5.services.NuitonModu= le - - - ${project.version} - - - - - + =20 - - + + + =20 + Nuiton-web :: Tapestry + Extra classes for Tapestry based applications =20 + + + + + jar + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + true + true + + + + org.nuiton.web.tapestry5.services.NuitonModule + + + ${project.version} + + + + + + + + + + Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annota= tions/RequiresAuthentication.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/annota= tions/RequiresAuthentication.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/= RequiresAuthentication.java 2011-01-07 10:25:59 UTC (rev 38) @@ -1,4 +1,3 @@ - package org.nuiton.web.tapestry5.annotations; =20 import java.lang.annotation.Documented; @@ -10,15 +9,15 @@ /** * This annotation is used on pages and components that need authentication * to be rendered. - * + *

* Created: 3 mai 2010 * * @author fdesbois - * $Id$ + * $Id$ */ -@Target({ ElementType.TYPE }) +@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface RequiresAuthentication { - =20 + } Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/compon= ents/FeedBack.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compon= ents/FeedBack.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/F= eedBack.java 2011-01-07 10:25:59 UTC (rev 38) @@ -19,9 +19,6 @@ =20 package org.nuiton.web.tapestry5.components; =20 -import java.util.ArrayList; -import java.util.List; - import org.apache.tapestry5.BindingConstants; import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.MarkupWriter; @@ -30,16 +27,19 @@ import org.apache.tapestry5.annotations.Parameter; import org.apache.tapestry5.ioc.annotations.Inject; =20 +import java.util.ArrayList; +import java.util.List; + /** * Composant qui affiche des messages =C3=A0 l'utilisateur. - * + *

* Ce composant permet d'afficher des messages avec une apparence diff=C3=A9= rente * selon leur type (info ou erreur). Lors de l'affichage de la page, les * messages seront affich=C3=A9s et la collection de messages sera vid=C3=A9= e. - * + *

* Pour personnaliser l'apparence des messages il faut d=C3=A9finir les clas= ses * fb-error et fb-info dans le CSS. - * + *

*

  * Utilisation :
  * <t:feedback t:id=3D"feedback"/>
@@ -54,13 +54,17 @@
 @IncludeStylesheet("feedback.css")
 public class FeedBack {
=20
-    @Parameter(defaultPrefix =3D BindingConstants.LITERAL, value=3D "true")
+    @Parameter(defaultPrefix =3D BindingConstants.LITERAL, value =3D "true")
     private boolean autoClear;
=20
-    /** Messages d'erreur */
+    /**
+     * Messages d'erreur
+     */
     private List errorMessages;
=20
-    /** Messages d'info */
+    /**
+     * Messages d'info
+     */
     private List infoMessages;
=20
     private boolean errors;

Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/compon=
ents/SubForm.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/compon=
ents/SubForm.java	2011-01-07 09:58:15 UTC (rev 35)
+++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/S=
ubForm.java	2011-01-07 10:25:59 UTC (rev 38)
@@ -10,7 +10,10 @@
  *
  * @author fdesbois 
  * @version $Id: SubForm.java 3003 2010-05-19 18:25:58Z fdesbois $
+ * @deprecated since 0.2, will be removed in next version. Useless since Sel=
ect
+ *             component could have zone in Tapestry 5.2
  */
+@Deprecated
 public class SubForm {
=20
     @Parameter

Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/A=
bstractMappedGridDataSource.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/data/A=
bstractMappedGridDataSource.java	2011-01-07 09:58:15 UTC (rev 35)
+++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstrac=
tMappedGridDataSource.java	2011-01-07 10:25:59 UTC (rev 38)
@@ -1,9 +1,5 @@
-
 package org.nuiton.web.tapestry5.data;
=20
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.tapestry5.beaneditor.PropertyModel;
 import org.apache.tapestry5.grid.ColumnSort;
@@ -12,11 +8,15 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
=20
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
 /**
  * AbstractMappedGridDataSource
- *
+ * 

* TODO : javadoc - * + *

* Created: 18 janv. 2010 * * @param Type of the map key @@ -39,14 +39,16 @@ =20 private boolean prepared; =20 - /** Need to be provided by subclass, used by Grid component **/ + /** + * Need to be provided by subclass, used by Grid component * + */ @Override public abstract Class getRowType(); =20 protected abstract int count(); =20 protected abstract Map execute(int startIndex, int endIndex, - SortConstraint orderBy); + SortConstraint orderBy); =20 @Override public int getAvailableRows() { @@ -61,7 +63,7 @@ =20 @Override public void prepare(int startIndex, int endIndex, - List sortConstraints) { + List sortConstraints) { if (log.isDebugEnabled()) { log.debug("Prepare results : " + startIndex + ", " + endIndex); } Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins= /Confirm.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/mixins= /Confirm.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confi= rm.java 2011-01-07 10:25:59 UTC (rev 38) @@ -15,9 +15,9 @@ * * @author fdesbois * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ + *

+ * Last update: $Date$ + * by : $Author$ */ @IncludeJavaScriptLibrary("confirm.js") public class Confirm { @@ -39,10 +39,10 @@ =20 @AfterRender public void afterRender() { - if (!wDisabled) { - renderSupport.addScript(String.format("new Confirm('%s', '%s', = %b);", - element.getClientId(), message.replace("'", "\\'"), con= dition)); - } + if (!wDisabled) { + renderSupport.addScript(String.format("new Confirm('%s', '%s', %= b);", + element.getClientId(), message.replace("'", "\\'"), cond= ition)); + } } =20 } Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins= /ZoneUpdater.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/mixins= /ZoneUpdater.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneU= pdater.java 2011-01-07 10:25:59 UTC (rev 38) @@ -37,15 +37,15 @@ * * @author ingesol * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ + *

+ * Last update: $Date$ + * by : $Author$ */ @IncludeJavaScriptLibrary("zoneUpdater.js") public class ZoneUpdater { =20 public static final String PLACEHOLDER =3D "XXX"; - =20 + @Inject private ComponentResources resources; =20 Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/AbstractAuthenticationFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/servic= es/AbstractAuthenticationFilter.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abs= tractAuthenticationFilter.java 2011-01-07 10:25:59 UTC (rev 38) @@ -1,7 +1,5 @@ package org.nuiton.web.tapestry5.services; =20 -import java.io.IOException; -import java.lang.annotation.Annotation; import org.apache.tapestry5.Link; import org.apache.tapestry5.runtime.Component; import org.apache.tapestry5.services.ComponentEventRequestParameters; @@ -14,15 +12,18 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; =20 +import java.io.IOException; +import java.lang.annotation.Annotation; + /** * AbstractAuthenticationFilter - * + *

* Created: 3 mai 2010 * * @param type of User * @param type of Annotation that manage authentication on pages/compone= nts * @author fdesbois - * $Id$ + * $Id$ */ public abstract class AbstractAuthenticationFilter implements ComponentRequestFilter { @@ -45,12 +46,12 @@ } =20 protected abstract Class getRedirectPage( - AuthenticationRedirect redirectType); + AuthenticationRedirect redirectType); =20 public AbstractAuthenticationFilter(PageRenderLinkSource renderLinkSourc= e, - ComponentSource componentSource, Response response, - ServiceAuthentication serviceAuthentication, - Class annotationClass) { + ComponentSource componentSource, Res= ponse response, + ServiceAuthentication serviceAuth= entication, + Class annotationClass) { this.pageRender =3D renderLinkSource; this.componentSource =3D componentSource; this.response =3D response; @@ -66,7 +67,7 @@ public void handleComponentEvent( ComponentEventRequestParameters parameters, ComponentRequestHandler handler) throws IOException { - =20 + if (logger.isTraceEnabled()) { logger.trace("handleComponentEvent"); } @@ -81,7 +82,7 @@ =20 @Override public void handlePageRender(PageRenderRequestParameters parameters, - ComponentRequestHandler handler) throws IOException { + ComponentRequestHandler handler) throws IOE= xception { =20 if (logger.isTraceEnabled()) { logger.trace("handlePageRender"); Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBinding.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBinding.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBinding.java 2011-01-07 10:25:59 UTC (rev 38) @@ -1,24 +1,25 @@ package org.nuiton.web.tapestry5.services; =20 -import java.util.ArrayList; -import java.util.List; import org.apache.tapestry5.Binding; import org.apache.tapestry5.internal.bindings.AbstractBinding; import org.apache.tapestry5.ioc.Location; import org.apache.tapestry5.ioc.Messages; =20 +import java.util.ArrayList; +import java.util.List; + /** * From Tapestry5HowTo *

Usage :

*
  * ${format:key=3Dvalue1,value2} or <t:component t:parameter=3D"format:ke=
y=3Dvalue1,value2">
  * 
- * + *

* Created: 27 avr. 2010 * + * @author fdesbois + * $Id$ * @see FormatBindingFactory - * @author fdesbois - * $Id$ */ public class FormatBinding extends AbstractBinding { =20 @@ -28,7 +29,7 @@ private final List valueBindings; =20 public FormatBinding(Location location, Messages messages, boolean invar= iant, - ArrayList keyBindings, List valueBindings) { + ArrayList keyBindings, List value= Bindings) { super(location); =20 this.messages =3D messages; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBindingFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBindingFactory.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBindingFactory.java 2011-01-07 10:25:59 UTC (rev 38) @@ -1,8 +1,5 @@ package org.nuiton.web.tapestry5.services; =20 -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import org.apache.tapestry5.Binding; import org.apache.tapestry5.BindingConstants; import org.apache.tapestry5.ComponentResources; @@ -10,6 +7,10 @@ import org.apache.tapestry5.services.BindingFactory; import org.apache.tapestry5.services.BindingSource; =20 +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** * From Tapestry5HowTo *
@@ -21,11 +22,11 @@ * configuration.add("format", new FormatBindingFactory(bindingSource)= ); * } *

- * + *

* Created: 27 avr. 2010 * * @author fdesbois - * $Id$ + * $Id$ */ public class FormatBindingFactory implements BindingFactory { @@ -42,7 +43,7 @@ =20 @Override public Binding newBinding(String description, ComponentResources contain= er, ComponentResources component, - String expression, Location location) { + String expression, Location location) { int separatorIndex =3D expression.indexOf(SEPARATOR); =20 if (-1 =3D=3D separatorIndex) { @@ -66,8 +67,8 @@ } =20 private ArrayList createBindings(String description, ComponentR= esources container, - ComponentResources component, String defaultPrefix, - List expressions, Location location) { + ComponentResources component, = String defaultPrefix, + List expressions, Loca= tion location) { ArrayList bindings =3D new ArrayList(expressions.s= ize()); =20 for (String expression : expressions) { Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/NuitonModule.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/servic= es/NuitonModule.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nui= tonModule.java 2011-01-07 10:25:59 UTC (rev 38) @@ -1,4 +1,3 @@ - package org.nuiton.web.tapestry5.services; =20 import org.apache.tapestry5.ioc.Configuration; @@ -9,11 +8,11 @@ =20 /** * NuitonModule - * + *

* Created: 4 mai 2010 * * @author fdesbois - * $Id$ + * $Id$ */ public class NuitonModule { =20 Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthentication.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthentication.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthentication.java 2011-01-07 10:25:59 UTC (rev 38) @@ -1,4 +1,3 @@ - package org.nuiton.web.tapestry5.services; =20 /** @@ -28,27 +27,27 @@ * MappedConfiguration, * ApplicationStateContribution> configuration, * final ServiceAuthentication serviceAuthentication) { - * + *

* ApplicationStateCreator creator =3D * new ApplicationStateCreator() { - * + *

* @Override * public MyUser create() { * return serviceAuthentication.getNewUserInstance(); * } * }; - * + *

* configuration.add(MyUser.class, * new ApplicationStateContribution("session", creator)); * } * - * - * + *

+ *

* Created: 3 mai 2010 * * @param user type * @author fdesbois - * $Id$ + * $Id$ */ public interface ServiceAuthentication { =20 Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthenticationImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthenticationImpl.java 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthenticationImpl.java 2011-01-07 10:25:59 UTC (rev 38) @@ -1,10 +1,10 @@ - package org.nuiton.web.tapestry5.services; =20 -import java.lang.annotation.Annotation; import org.apache.tapestry5.ioc.internal.util.TapestryException; import org.apache.tapestry5.services.ApplicationStateManager; =20 +import java.lang.annotation.Annotation; + /** * This class is an abstract implementation of {@link ServiceAuthentication}. * This service use {@link ApplicationStateManager} to manage connected user. @@ -26,13 +26,13 @@ * No need to contribute to ApplicationStateManager to provide instantiation * of user. Even this service used the default constructor to instanciate a = new * user. - * + *

* Created: 3 mai 2010 * * @param user type * @param annotation type used to identify which page need authentication * @author fdesbois - * $Id$ + * $Id$ */ public class ServiceAuthenticationImpl implements ServiceAuthentication { @@ -40,12 +40,12 @@ /** * Tapestry service used to save user in session and retrieve it when * needed. - **/ + */ private final ApplicationStateManager stateManager; =20 - /**=20 + /** * User type - **/ + */ protected Class userClass; =20 /** @@ -57,13 +57,13 @@ /** * Constructor to call in subclasses. * - * @param stateManager from Tapestry - * @param userClass to identify which type of user is managed + * @param stateManager from Tapestry + * @param userClass to identify which type of user is managed * @param annotationClass to identify which type of annotation is managed - * for authentication treatment. + * for authentication treatment. */ public ServiceAuthenticationImpl(ApplicationStateManager stateManager, - Class userClass, Class annotationClass) { + Class userClass, Class annotation= Class) { this.stateManager =3D stateManager; this.userClass =3D userClass; this.annotationClass =3D annotationClass; @@ -106,14 +106,14 @@ // No restriction if annotation is not present return true; } - =20 + /** * Check the connected user authorizations. Called in * {@link #isAllowed(Class)} method after detect the annotation on the * current page. Override this method to provide more specific * authentication managment. * - * @param user current user connected. + * @param user current user connected. * @param annotation from page to check authorizations. * @return true if the user is granted, false otherwise */ Modified: trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/c= omponents/SubForm.tml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry-extra/src/main/resources/org/nuiton/web/tapestry5/c= omponents/SubForm.tml 2011-01-07 09:58:15 UTC (rev 35) +++ trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/compone= nts/SubForm.tml 2011-01-07 10:25:59 UTC (rev 38) @@ -1,14 +1,16 @@ - - + + =20 - - -

- - - - - - + + +
+ + +
+ + + =20 \ No newline at end of file --===============2885688175675982326==-- From fdesbois@users.nuiton.org Fri Jan 7 11:43:26 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r39 - trunk Date: Fri, 07 Jan 2011 11:43:26 +0100 Message-ID: <20110107104326.6BF2215BF3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1059556234999971065==" --===============1059556234999971065== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: fdesbois Date: 2011-01-07 11:43:26 +0100 (Fri, 07 Jan 2011) New Revision: 39 Url: http://nuiton.org/repositories/revision/nuiton-web/39 Log: merge problem, properties doubloon Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-07 10:25:59 UTC (rev 38) +++ trunk/pom.xml 2011-01-07 10:43:26 UTC (rev 39) @@ -112,10 +112,6 @@ 1.5.3 1.6.1 - - 5.1.0.5 - 1.2.2 - en,fr --===============1059556234999971065==-- From fdesbois@users.nuiton.org Fri Jan 7 12:05:53 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r40 - in trunk: . nuiton-tapestry nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services Date: Fri, 07 Jan 2011 12:05:53 +0100 Message-ID: <20110107110553.574BB15BDE@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0701298832090701912==" --===============0701298832090701912== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2011-01-07 12:05:53 +0100 (Fri, 07 Jan 2011) New Revision: 40 Url: http://nuiton.org/repositories/revision/nuiton-web/40 Log: - Use org.nuiton.web groupId - Change deprecated apis for Tapestry 5.2 Modified: trunk/nuiton-tapestry/pom.xml trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confir= m.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneUp= dater.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Serv= iceAuthenticationImpl.java trunk/pom.xml Modified: trunk/nuiton-tapestry/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/pom.xml 2011-01-07 10:43:26 UTC (rev 39) +++ trunk/nuiton-tapestry/pom.xml 2011-01-07 11:05:53 UTC (rev 40) @@ -10,7 +10,7 @@ =20 - org.nuiton + org.nuiton.web nuiton-web-parent 1.0-SNAPSHOT Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins= /Confirm.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confi= rm.java 2011-01-07 10:43:26 UTC (rev 39) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confi= rm.java 2011-01-07 11:05:53 UTC (rev 40) @@ -2,24 +2,21 @@ =20 import org.apache.tapestry5.BindingConstants; import org.apache.tapestry5.ClientElement; -import org.apache.tapestry5.RenderSupport; import org.apache.tapestry5.annotations.AfterRender; -import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry5.annotations.Import; import org.apache.tapestry5.annotations.InjectContainer; import org.apache.tapestry5.annotations.Parameter; import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.services.javascript.JavaScriptSupport; =20 /** * A simple mixin for attaching a javascript confirmation box to the onclick * event of any component that implements ClientElement. * * @author fdesbois - * @version $Revision$ - *

- * Last update: $Date$ - * by : $Author$ + * @version $Id$ */ -@IncludeJavaScriptLibrary("confirm.js") +@Import(library =3D "confirm.js") public class Confirm { =20 @Parameter(value =3D "Are you sure?", defaultPrefix =3D BindingConstants= .MESSAGE) @@ -29,7 +26,7 @@ private boolean condition; =20 @Inject - private RenderSupport renderSupport; + private JavaScriptSupport javaScriptSupport; =20 @InjectContainer private ClientElement element; @@ -40,7 +37,7 @@ @AfterRender public void afterRender() { if (!wDisabled) { - renderSupport.addScript(String.format("new Confirm('%s', '%s', %= b);", + javaScriptSupport.addScript(String.format("new Confirm('%s', '%s= ', %b);", element.getClientId(), message.replace("'", "\\'"), cond= ition)); } } Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins= /ZoneUpdater.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneU= pdater.java 2011-01-07 10:43:26 UTC (rev 39) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneU= pdater.java 2011-01-07 11:05:53 UTC (rev 40) @@ -25,23 +25,21 @@ import org.apache.tapestry5.ClientElement; import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.Link; -import org.apache.tapestry5.RenderSupport; import org.apache.tapestry5.annotations.Environmental; -import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry5.annotations.Import; import org.apache.tapestry5.annotations.InjectContainer; import org.apache.tapestry5.annotations.Parameter; import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.services.javascript.JavaScriptSupport; =20 /** * From Ingesol Blog * * @author ingesol - * @version $Revision$ - *

- * Last update: $Date$ - * by : $Author$ + * @author fdesbois + * @version $Id$ */ -@IncludeJavaScriptLibrary("zoneUpdater.js") +@Import(library =3D "zoneUpdater.js") public class ZoneUpdater { =20 public static final String PLACEHOLDER =3D "XXX"; @@ -50,7 +48,7 @@ private ComponentResources resources; =20 @Environmental - private RenderSupport renderSupport; + private JavaScriptSupport javaScriptSupport; =20 @Parameter(defaultPrefix =3D BindingConstants.LITERAL) private String clientEvent; @@ -76,7 +74,8 @@ if (context =3D=3D null) { context =3D new Object[]{PLACEHOLDER}; } else { - context =3D ArrayUtils.add(context, PLACEHOLDER); // To be repla= ced by javascript + // To be replaced by javascript + context =3D ArrayUtils.add(context, PLACEHOLDER); } =20 return resources.createEventLink(event, context); @@ -93,7 +92,15 @@ if (listeningElement =3D=3D null) { listeningElement =3D "$('" + elementId + "')"; } - renderSupport.addScript("new ZoneUpdater('%s', %s, '%s', '%s', '%s',= '%s')", elementId, listeningElement, clientEvent, link, zone, PLACEHOLDER); =20 + javaScriptSupport.addScript( + "new ZoneUpdater('%s', %s, '%s', '%s', '%s', '%s')", + elementId, + listeningElement, + clientEvent, + link, + zone, + PLACEHOLDER + ); } } Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthenticationImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthenticationImpl.java 2011-01-07 10:43:26 UTC (rev 39) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthenticationImpl.java 2011-01-07 11:05:53 UTC (rev 40) @@ -32,7 +32,7 @@ * @param user type * @param annotation type used to identify which page need authentication * @author fdesbois - * $Id$ + * @version $Id$ */ public class ServiceAuthenticationImpl implements ServiceAuthentication { Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2011-01-07 10:43:26 UTC (rev 39) +++ trunk/pom.xml 2011-01-07 11:05:53 UTC (rev 40) @@ -15,6 +15,7 @@ 2.4.1 =20 + org.nuiton.web nuiton-web-parent 1.0-SNAPSHOT =20 --===============0701298832090701912==-- From fdesbois@users.nuiton.org Fri Jan 7 12:42:14 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r41 - in trunk: . nuiton-rss nuiton-rss/src nuiton-rss/src/license nuiton-rss/src/main nuiton-rss/src/main/java nuiton-rss/src/main/java/org nuiton-rss/src/main/java/org/nuiton nuiton-rss/src/main/java/org/nuiton/rss nuiton-rss/src/main/resources nuiton-rss/src/main/resources/fckeditor nuiton-rss/src/main/resources/fckeditor/editor nuiton-rss/src/main/resources/fckeditor/editor/plugins nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude nuiton-rss/src/main/resources/fckedi Date: Fri, 07 Jan 2011 12:42:13 +0100 Message-ID: <20110107114213.E5C4F15BDE@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1390197112115141685==" --===============1390197112115141685== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2011-01-07 12:42:13 +0100 (Fri, 07 Jan 2011) New Revision: 41 Url: http://nuiton.org/repositories/revision/nuiton-web/41 Log: #1189 : introduce nuiton-rss Added: trunk/nuiton-rss/ trunk/nuiton-rss/LICENSE.txt trunk/nuiton-rss/README.txt trunk/nuiton-rss/changelog.txt trunk/nuiton-rss/pom.xml trunk/nuiton-rss/src/ trunk/nuiton-rss/src/license/ trunk/nuiton-rss/src/license/THIRD-PARTY.properties trunk/nuiton-rss/src/main/ trunk/nuiton-rss/src/main/java/ trunk/nuiton-rss/src/main/java/org/ trunk/nuiton-rss/src/main/java/org/nuiton/ trunk/nuiton-rss/src/main/java/org/nuiton/rss/ trunk/nuiton-rss/src/main/java/org/nuiton/rss/BaseServlet.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/ConfigInitializer.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedData.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedEntryComparator.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedHTMLRenderer.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRenderer.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRendererConfig.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedType.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedURLResolver.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/Field.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLCleaner.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLScriptCleaner.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSConfig.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGenerator.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorConfig.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorServlet.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSHelper.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSIOUtil.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSServlet.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/SimpleFeedURLResolver.java trunk/nuiton-rss/src/main/resources/ trunk/nuiton-rss/src/main/resources/fckeditor/ trunk/nuiton-rss/src/main/resources/fckeditor/editor/ trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/ trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/ trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/RE= ADME.txt trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/bu= tton.rss.gif trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/fc= k_rssinclude.html trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/fc= k_rssinclude.js trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/fc= kplugin.js trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/la= ng/ trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/la= ng/en.js trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/la= ng/fr.js trunk/nuiton-rss/src/main/resources/fckeditor/myfckconfig.js trunk/nuiton-rss/src/main/resources/log4j.properties trunk/nuiton-rss/src/main/webapp/ trunk/nuiton-rss/src/main/webapp/WEB-INF/ trunk/nuiton-rss/src/main/webapp/WEB-INF/web.xml trunk/nuiton-rss/src/main/webapp/feed.css trunk/nuiton-rss/src/main/webapp/feeds.txt trunk/nuiton-rss/src/main/webapp/index.html trunk/nuiton-rss/src/main/webapp/rssgenerator.js trunk/nuiton-rss/src/main/webapp/rssinclude.js trunk/nuiton-rss/src/main/webapp/testFck.html trunk/nuiton-rss/src/main/webapp/testGenerator.html trunk/nuiton-rss/src/main/webapp/testRender.html trunk/nuiton-rss/src/site/ trunk/nuiton-rss/src/site/apt/ trunk/nuiton-rss/src/site/apt/index.apt trunk/nuiton-rss/src/site/site_fr.xml trunk/nuiton-rss/src/test/ trunk/nuiton-rss/src/test/java/ trunk/nuiton-rss/src/test/java/org/ trunk/nuiton-rss/src/test/java/org/nuiton/ trunk/nuiton-rss/src/test/java/org/nuiton/rss/ trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSGeneratorHelperTest.java trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSTest.java trunk/nuiton-rss/src/test/java/resources/ trunk/nuiton-rss/src/test/java/resources/log4j.properties Modified: trunk/ trunk/changelog.txt trunk/nuiton-tapestry/changelog.txt trunk/nuiton-tapestry/pom.xml trunk/pom.xml Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - target *.ipr *.iws *.iml .project .classpath + target *.ipr *.iws *.iml .project .classpath .settings *.log nbactions.xml Modified: trunk/changelog.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/changelog.txt 2011-01-07 11:05:53 UTC (rev 40) +++ trunk/changelog.txt 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,2 @@ +Please refer to the release note : + http://maven-site.nuiton.org/nuiton-web/changes-report.html \ No newline at end of file Property changes on: trunk/nuiton-rss ___________________________________________________________________ Added: svn:ignore + target *.ipr *.iws *.iml .project .classpath .settings *.log nbactions.xml Added: trunk/nuiton-rss/LICENSE.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/LICENSE.txt (rev 0) +++ trunk/nuiton-rss/LICENSE.txt 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions.=20 + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version.=20 + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + Added: trunk/nuiton-rss/changelog.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/changelog.txt (rev 0) +++ trunk/nuiton-rss/changelog.txt 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,2 @@ +Please refer to the release note : + http://maven-site.nuiton.org/nuiton-rss/changes-report.html \ No newline at end of file Added: trunk/nuiton-rss/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/pom.xml (rev 0) +++ trunk/nuiton-rss/pom.xml 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,223 @@ + + + + + 4.0.0 + + + + + + + org.nuiton.web + nuiton-web-parent + 1.0-SNAPSHOT + + + nuiton-rss + + + + + commons-logging + commons-logging + + + + commons-collections + commons-collections + + + + commons-beanutils + commons-beanutils + + + + org.jdom + jdom + + + + rome + rome + + + + javax.servlet + servlet-api + + + + log4j + log4j + + + + + junit + junit + + + + + + + + + + Nuiton Web :: Nuiton RSS + Servlet pouvant etre appeler depuis du JS pour recuperer un + flux RSS + + 2008 + + + + + + war + + + + + ${redmine.libReleaseFiles} + + + + + + + + + maven-dependency-plugin + + ${project.build.directory}/lib + + + + + + + + + + maven-war-plugin + + target/nuitonrss + + + + + maven-jar-plugin + + + + true + lib/ + + + + + + + + + + + + + + + + + reporting + + + performRelease + true + + + + + + + maven-javadoc-plugin + + true + + http://java.sun.com/javase/6/docs/api/ + + + + + + + + + + + assembly-profile + + + performRelease + true + + + + package + + + + + maven-assembly-plugin + + + create-assemblies + package + + single + + + + + false + + deps + full + + + + + + + + + + + + Added: trunk/nuiton-rss/src/license/THIRD-PARTY.properties =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/license/THIRD-PARTY.properties = (rev 0) +++ trunk/nuiton-rss/src/license/THIRD-PARTY.properties 2011-01-07 11:42:13 U= TC (rev 41) @@ -0,0 +1,13 @@ +# Generated by org.nuiton.license.plugin.AddThirdPartyMojo +#---------------------------------------------------------------------------= ---- +# Already used licenses in project : +# - BSD License +# - Common Public License Version 1.0 +# - The Apache Software License, Version 2.0 +#---------------------------------------------------------------------------= ---- +# Please fill the missing licenses for dependencies : +# +# +#Thu Dec 30 12:16:27 CET 2010 +javax.servlet--servlet-api--2.5--jar=3DSun Microsystems, Inc. Binary Code Li= cense Agreement for the JDK 5.0 +org.jdom--jdom--1.1--jar=3DApache Software License Like Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/BaseServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/BaseServlet.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/BaseServlet.java 2011-01-07= 11:42:13 UTC (rev 41) @@ -0,0 +1,145 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: BaseServlet.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/BaseServlet.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + *

+ * Servlet de base + * + * @param la classe de l'object de delegation + * @author chemit + */ +public abstract class BaseServlet extends HttpServlet { + + /** + * to use log facility, just put in your code: log.info(\"...\"); + */ + protected static final Log log =3D LogFactory.getLog(BaseServlet.class); + /** + * L'objet de delegation du metier de la servlet + */ + protected transient D delegate; + private static final long serialVersionUID =3D 1L; + + /** + * @return the new delegate object to be used by servlet + * @throws Exception if any problem while instanciation + */ + protected abstract D newDelegate() throws Exception; + + /** + * @return a new ConfigInitializer to be used in + * {@link #init(ServletConfig, boolean)} method to prepare + * default config. + */ + protected abstract ConfigInitializer newConfigInitiali= zer(); + + /** + * Processes requests for both HTTP GET and POST methods. + * + * @param request servlet request + * @param response servlet response + * @throws IOException TODO + * @throws ServletException TODO + */ + protected abstract void processRequest(HttpServletRequest request, HttpS= ervletResponse response) throws ServletException, IOException; + + @Override + public void init(ServletConfig config) throws ServletException { + init(config, true); + } + + protected void init(ServletConfig config, boolean initConfig) throws Ser= vletException { + try { + super.init(config); + if (initConfig) { + // init de la configuration par defaut depuis la config de s= ervlet + newConfigInitializer().init(config); + } + // instanciate delegate + delegate =3D newDelegate(); + } catch (Exception eee) { + log.warn("Can't configure Servlet", eee); + if (eee instanceof ServletException) { + throw (ServletException) eee; + } + throw new ServletException("Can't configure Servlet", eee); + } + } + + protected Integer convertToInt(String parameter) { + Integer result =3D null; + try { + result =3D Integer.parseInt(parameter); + } catch (Exception eee) { + log.debug("Can't convert to int: '" + parameter + "'", eee); + } + return result; + } + // + + /** + * Handles the HTTP GET method. + * + * @param request servlet request + * @param response servlet response + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse res= ponse) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * + * @param request servlet request + * @param response servlet response + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse re= sponse) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + */ + @Override + public String getServletInfo() { + return "RSS Servlet"; + } + // +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/ConfigInitializer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/ConfigInitializer.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/ConfigInitializer.java 2011= -01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,80 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: ConfigInitializer.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/ConfigInitializer.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import org.apache.commons.beanutils.BeanUtils; + +/** + * @param la classe source de la configuration + * @param la classe destination de la configuration + * @author tony + */ +public abstract class ConfigInitializer { + + + /** + * @param config l'object source contenant les configs + * @param fullConfigName le nom complet de la propriete recherchee + * @return la valeur de la propriete ou null si non trouve + */ + protected abstract String getConfigValue(S config, String fullConfigName= ); + + public abstract void init(S config); + + /** + * Initialise RSSConfig. + * + * @param prefix + * @param klass la class de la configuration de destination + * @param config la configuration source + * @param keys + */ + public void init(String prefix, Class klass, S config, String... keys= ) { + try { + String prefixConfig =3D getConfigValue(config, prefix); + prefixConfig =3D prefixConfig =3D=3D null ? "" : prefixConfig.tr= im(); + + D instance =3D klass.newInstance(); + for (String key : keys) { + loadConfig(config, instance, prefixConfig, key); + } + } catch (InstantiationException ex) { + throw new RuntimeException(ex); + } catch (IllegalAccessException ex) { + throw new RuntimeException(ex); + } + } + + protected void loadConfig(S config, D instance, String prefix, String co= nfigName) { + String value =3D getConfigValue(config, prefix + configName); + if (value !=3D null && !"".equals(value)) { + try { + BeanUtils.setProperty(instance, configName, value); + } catch (Exception ex) { + throw new IllegalStateException("could not load property " += configName + " from config " + config + " for reason : " + ex.getMessage()); + } + } + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedData.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedData.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedData.java 2011-01-07 11= :42:13 UTC (rev 41) @@ -0,0 +1,128 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: FeedData.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/FeedData.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndFeed; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.net.URL; + +/** + *

+ * Represente une URL demandee. Cette objet est conserve durant le temps de = vie + * de la JVM pour permettre de mutualiser la recuperation et la transformati= on en + * HTML. + *

+ *

+ * Lorsque l'on demande le HTML et que l'url n'a pas encore ete recuperee ou + * est trop ancienne alors on lance la recuperation. Si deux threads demande= nt + * la recuperation, le deuxieme est mis en attente et profitera de la recupe= ration + * de l'autre. + *

+ * + * @author poussin + */ +public class FeedData { + + /** + * to use log facility, just put in your code: log.info(\"...\"); + */ + private static final Log log =3D LogFactory.getLog(FeedData.class); + + /** + * url du feed + */ + protected URL url; + /** + * les champs que l'on souhaite visualiser pour le feed + */ + protected FeedRendererConfig rendererConfig; + /** + * Le nombre d'item que l'on souhaite visualiser pour le feed + */ + protected int nbItem =3D -1; + + protected SyndFeed feed; + protected long lastRetrived; + + public FeedData(URL url, int nbItem, String representation) { + this(url); + this.nbItem =3D nbItem; + rendererConfig =3D new FeedRendererConfig(representation); + } + + public FeedData(URL url) { + this.url =3D url; + } + + public long getLastRetrived() { + return lastRetrived; + } + + public URL getUrl() { + return url; + } + + public FeedRendererConfig getRendererConfig() { + return rendererConfig; + } + + public void setRendererConfig(FeedRendererConfig rendererConfig) { + this.rendererConfig =3D rendererConfig; + } + + public int getNbItem() { + return nbItem; + } + + public void setNbItem(int nbItem) { + this.nbItem =3D nbItem; + } + + /** + * Retourne la representation HTML du RSS + * + * @return la representation HTML du RSS + */ + public SyndFeed getFeed() { + if (feed =3D=3D null || lastRetrived + RSSConfig.TIME_FORCE_RETRIEVE= D < System.currentTimeMillis()) { + forceRetrived(); + } + + return feed; + } + + synchronized protected void forceRetrived() { + if (lastRetrived + RSSConfig.TIME_FORCE_RETRIEVED < System.currentTi= meMillis()) { + try { + feed =3D RSSIOUtil.readFeed(url); + lastRetrived =3D System.currentTimeMillis(); + } catch (Exception eee) { + log.warn("Can't get feed: " + url, eee); + } + } + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedEntryComparator.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedEntryComparator.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedEntryComparator.java 20= 11-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,42 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: FeedEntryComparator.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/FeedEntryComparator.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndEntry; + +import java.util.Comparator; + +/** + * Comparator of entry base on his publication date + * + * @author tony + */ +public class FeedEntryComparator implements Comparator { + + public int compare(SyndEntry o1, SyndEntry o2) { + return o1.getPublishedDate().compareTo(o2.getPublishedDate()); + } + +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedHTMLRenderer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedHTMLRenderer.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedHTMLRenderer.java 2011-= 01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,240 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: FeedHTMLRenderer.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/FeedHTMLRenderer.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndFeed; +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Arrays; +import java.util.EnumMap; +import java.util.HashSet; +import java.util.Set; + +/** + * @author poussin + */ +public class FeedHTMLRenderer implements FeedRenderer { + + /** + * to use log facility, just put in your code: log.info(\"...\"); + */ + private static final Log log =3D LogFactory.getLog(FeedHTMLRenderer.clas= s); + + private static final String FEED_CSS_PREFIX =3D "feed-"; + private static final String FEED_ITEM_CSS_PREFIX =3D "feedItem-"; + + /** + * tous les HTMLCleaner a utiliser pour nettoyer les chaines + */ + protected Set cleaners =3D new HashSet(); + + protected EnumMap templates =3D new EnumMap(Field.class); + protected EnumMap classnames =3D new EnumMap(Field.class); + protected EnumMap feedProperties =3D new EnumMap(Field.class); + protected EnumMap itemProperties =3D new EnumMap(Field.class); + + /** + * @param cleaners La liste des cleaners a utiliser par defaut. Si aucun + * cleaner n'est passer en argument HTMLScriptCleaner es= t automatiquement + * ajoute + */ + public FeedHTMLRenderer(HTMLCleaner... cleaners) { + if (cleaners.length =3D=3D 0) { + addHTMLCleaner(new HTMLScriptCleaner()); + } + for (HTMLCleaner cleaner : cleaners) { + addHTMLCleaner(cleaner); + } + + templates.put(Field.NAME, "%2$s\n"); + templates.put(Field.LINK, "
%3$s<= /a>"); + templates.put(Field.IMAGE, "\n"); + templates.put(Field.DESCRIPTION, "%2$s= \n"); + templates.put(Field.AUTHOR, "%2$s\n"); + //Probleme de conversion FIXME + templates.put(Field.TIME, "%2$s\n"); + //templates.put(Field.TIME, "%2$tF\n"); + + classnames.put(Field.NAME, "name"); + classnames.put(Field.LINK, "link"); + classnames.put(Field.IMAGE, "image"); + classnames.put(Field.DESCRIPTION, "description"); + classnames.put(Field.AUTHOR, "author"); + classnames.put(Field.TIME, "time"); + + feedProperties.put(Field.NAME, "title"); + feedProperties.put(Field.LINK, "link"); + // cela engendre des NPE... + feedProperties.put(Field.IMAGE, "image.url"); + feedProperties.put(Field.DESCRIPTION, "description"); + feedProperties.put(Field.AUTHOR, "author"); + feedProperties.put(Field.TIME, "publishedDate"); + + itemProperties.put(Field.NAME, "title"); + itemProperties.put(Field.LINK, "link"); + itemProperties.put(Field.IMAGE, null); + itemProperties.put(Field.DESCRIPTION, "description.value"); + itemProperties.put(Field.AUTHOR, "author"); + itemProperties.put(Field.TIME, "publishedDate"); + } + + + public FeedHTMLRenderer() { + this(new HTMLCleaner[0]); + } + + /** + * Supprime tous les cleaners de code html + */ + public void clearCleaners() { + cleaners.clear(); + } + + /** + * Ajoute un nouveau cleaner de code HTML + * + * @param cleaner cleaner to add + */ + public void addHTMLCleaner(HTMLCleaner cleaner) { + cleaners.add(cleaner); + } + + public String render(FeedRendererConfig config, SyndFeed feed, SyndEntry= [] items) { + + StringBuffer sbGlobal =3D new StringBuffer(); + + StringBuffer sbTemp =3D new StringBuffer(); + for (Field f : config.getFeedFieldOrder()) { + renderField(f, FEED_CSS_PREFIX, feedProperties, feed, sbTemp); + } + + String tmp =3D sbTemp.toString(); + if (!"".equals(tmp)) { + sbGlobal.append("
\n").append(tmp).append= ("
\n"); + } + sbGlobal.append("
    \n"); + sbTemp =3D new StringBuffer(); + for (SyndEntry item : items) { + sbTemp.append("
  • \n"); + for (Field f : config.getItemFieldOrder()) { + renderField(f, FEED_ITEM_CSS_PREFIX, itemProperties, item, s= bTemp); + } + sbTemp.append("
  • \n"); + } + sbGlobal.append(sbTemp.toString()).append("
\n"); + + return sbGlobal.toString(); + } + + protected void renderField(Field f, String cssPrefix, EnumMap properties, Object src, StringBuffer buffer) { + + if (f =3D=3D Field.LINK) { + // do nothing, link should not be called alone but inside name f= ield only + return; + } + String template =3D templates.get(f); + String classname =3D cssPrefix + classnames.get(f); + String prop =3D properties.get(f); + + if ("".equals(prop)) { + return; + } + + String result; + Object value =3D null; + try { + + value =3D BeanUtils.getProperty(src, prop); + if (f =3D=3D Field.NAME) { + //special case, we must first render link + String templateLink =3D templates.get(Field.LINK); + String classnameLink =3D "feed-" + classnames.get(Field.LINK= ); + String propLink =3D properties.get(Field.LINK); + Object value2 =3D BeanUtils.getProperty(src, propLink); + value =3D render(templateLink, classnameLink, value2, value); + } + + result =3D render(template, classname, value); + + if (result !=3D null && buffer !=3D null) { + buffer.append(result); + } + } catch (Exception eee) { + log.warn("Can't get feed property value for property " + prop + = ", value:" + value); + } + + } + + /** + * Permet de rendre un element du feed + * + * @param template le template pour rendre l'element + * @param classname la class de l'element html (pour une utilisation CSS) + * @param value la valeur de l'element + * @return le code HTML + */ + protected String render(String template, String classname, Object value)= { + StringBuffer sb =3D new StringBuffer(); + if (value !=3D null && !"".equals(value)) { + if (value instanceof String) { + // si value est une chaine, on la nettoie avec les cleaners = enregistrer + for (HTMLCleaner cleaner : cleaners) { + value =3D cleaner.clean((String) value); + } + } + sb.append(renderTemplate(template, classname, value)); + } + return sb.toString(); + } + + protected String render(String template, String classname, Object value,= Object value2) { + StringBuffer sb =3D new StringBuffer(); + if (value !=3D null && !"".equals(value)) { + if (value instanceof String) { + // si value est une chaine, on la nettoie avec les cleaners = enregistrer + for (HTMLCleaner cleaner : cleaners) { + value =3D cleaner.clean((String) value); + } + } + sb.append(renderTemplate(template, classname, value, value2)); + } + return sb.toString(); + } + + protected String renderTemplate(String template, Object... args) { + try { + String result; + result =3D String.format(template, args); + return result; + } catch (Exception e) { + log.warn("could not format template " + template + " with args := " + Arrays.toString(args)); + return ""; + } + } + +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRenderer.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRenderer.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRenderer.java 2011-01-0= 7 11:42:13 UTC (rev 41) @@ -0,0 +1,44 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: FeedRenderer.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/FeedRenderer.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndFeed; + +/** + * @author poussin + */ +public interface FeedRenderer { + + /** + * Retourne une chaine qui est la representation du feed et de ces items + * + * @param config la configuration a utiliser pour rendre le feed + * @param feed le feed a representer + * @param items la liste des items du feed a prendre en compte + * @return la representation souhaitee + */ + String render(FeedRendererConfig config, SyndFeed feed, SyndEntry[] item= s); +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRendererConfig.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRendererConfig.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRendererConfig.java 201= 1-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,120 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: FeedRendererConfig.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/FeedRendererConfig.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * Permet de spcecifier les champs a rendre, cet objet peut etre converti + * en une representation chaine pour etre facilement transportable. + *

+ *

+ * Exemple de representation texte: ndat-ndat. Le premier block represente le + * feed le second les items. S'il n'y a qu'un block cela veut dire qu'il ne + * faut pas reprensenter le feed mais seulement les items. L'ordre des lettr= es + * determine l'ordre du rendu. + *

  • n: name pour demander le nom ou titre du feed ou de l'item + *
  • i: image + *
  • d: description + *
  • a: author + *
  • t: time pour demander la date du feed ou de l'item + *

    + * + * @author poussin + */ +public class FeedRendererConfig { + + protected String feedString =3D "indat"; + protected List feedList; + protected String itemString =3D "indat"; + protected List itemList; + + public FeedRendererConfig() { + } + + public FeedRendererConfig(String representation) { + setString(representation); + } + + protected List createList(String value) { + List result =3D new ArrayList(); + for (char c : value.toCharArray()) { + Field field =3D Field.valueOf(c); + if (field !=3D null) { + result.add(field); + } + } + return result; + } + + public List getFeedFieldOrder() { + if (feedList =3D=3D null) { + feedList =3D createList(feedString); + } + return feedList; + } + + public List getItemFieldOrder() { + if (itemList =3D=3D null) { + itemList =3D createList(itemString); + } + return itemList; + } + + /** + * Permet de modifier la representation souhaitee + * + * @param f la nouvelle representation par ex: n-na + */ + public void setString(String f) { + String[] fi =3D f.split("-"); + if (fi.length > 1) { + feedString =3D fi[0]; + itemString =3D fi[1]; + } else { + feedString =3D ""; + itemString =3D fi[0]; + } + feedList =3D null; + itemList =3D null; + } + + /** + * Permet de retourner la representation string + * + * @return par ex: n-nad + */ + public String getString() { + String result =3D ""; + if (!"".equals(feedString)) { + result =3D feedString + "-"; + } + result +=3D itemString; + return result; + } + +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedType.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedType.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedType.java 2011-01-07 11= :42:13 UTC (rev 41) @@ -0,0 +1,53 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: FeedType.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/FeedType.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +/** + * Enumeration of known feed's type. + *

    + * Used to generate some feed files. + * + * @author tony + */ +public enum FeedType { + + RSS_0_90("rss_0.90"), + RSS_0_91("rss_0.91"), + RSS_0_92("rss_0.92"), + RSS_0_93("rss_0.93"), + RSS_1_0("rss_1.0"), + RSS_2_0("rss_2.0"), + ATOM_0_3("atom_0.3"), + ATOM_1_0("atom_1.0"); + private String type; + + public String getType() { + return type; + } + + private FeedType(String type) { + this.type =3D type; + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedURLResolver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedURLResolver.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedURLResolver.java 2011-0= 1-07 11:42:13 UTC (rev 41) @@ -0,0 +1,39 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: FeedURLResolver.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/FeedURLResolver.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import java.net.MalformedURLException; + +/** + * Permet de convertir une chaine en une URL. Le resolver le plus simple + * peut cr=C3=A9er une URL avec la chaine, mais un autre resolver peut utili= ser + * cette chaine comme cle dans une base de donn=C3=A9es pour recuperer la bo= nne URL. + * + * @author poussin + */ +public interface FeedURLResolver { + + FeedData resolv(String ask) throws MalformedURLException; +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/Field.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/Field.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/Field.java 2011-01-07 11:42= :13 UTC (rev 41) @@ -0,0 +1,66 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: Field.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/Field.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +/** + * Enumeration des champs disponibles pour le renderer + * + * @author poussin + */ +public enum Field { + + NAME('n'), IMAGE('i'), DESCRIPTION('d'), AUTHOR('a'), TIME('t'), LINK('l= '), CATEGORY('c'); + + /** + * le caractere utilise pour la version compactee d'une configuration de= renderer + */ + private char c; + + Field(char c) { + this.c =3D c; + } + + public char getC() { + return c; + } + + public static Field valueOf(char c) { + for (Field field : values()) { + if (field.c =3D=3D c) { + return field; + } + } + return null; + } + + public static Field[] getFeedFields() { + return new Field[]{NAME, IMAGE, DESCRIPTION, AUTHOR, TIME, LINK}; + } + + public static Field[] getItemFields() { + return new Field[]{NAME, DESCRIPTION, AUTHOR, TIME, LINK}; + } +} + Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLCleaner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLCleaner.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLCleaner.java 2011-01-07= 11:42:13 UTC (rev 41) @@ -0,0 +1,36 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: HTMLCleaner.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/HTMLCleaner.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +/** + * Permet de nettoyer une chaine avant incorporation dans du HTML + * + * @author poussin + */ +public interface HTMLCleaner { + + String clean(String s); + +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLScriptCleaner.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLScriptCleaner.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLScriptCleaner.java 2011= -01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,39 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: HTMLScriptCleaner.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/HTMLScriptCleaner.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +/** + * Supprime les balises de la chaine + * + * @author poussin + */ +public class HTMLScriptCleaner implements HTMLCleaner { + + public String clean(String s) { + String result =3D s.replaceAll("(?i)(?s)", ""); + return result; + } + +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSConfig.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSConfig.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSConfig.java 2011-01-07 1= 1:42:13 UTC (rev 41) @@ -0,0 +1,89 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSConfig.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/RSSConfig.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +/** + * Default configuration for {@link RSSHelper}. + * + * @author poussin + */ +public class RSSConfig { + + /** + * la propriete de configuration qui definit le prefix a jouter pour scr= uter la configuration + */ + private static final String CONFIGURATION_PREFIX_PROPERTY =3D RSSServlet= .class.getSimpleName() + "_configuration_prefix"; + + + /** + * Temps a partir duquel on reforce une recuperation + */ + public static long TIME_FORCE_RETRIEVED =3D 5 * 60 * 1000; + public static FeedRendererConfig DEFAULT_RENDERER_CONFIG =3D new FeedRen= dererConfig("n-natd"); + public static int DEFAULT_NB_ITEM =3D 7; + public static Class DEFAULT_RENDERER_CLASS =3D F= eedHTMLRenderer.class; + public static Class DEFAULT_RESOLVER_CLASS = =3D SimpleFeedURLResolver.class; + + public void setTIME_FORCE_RETRIEVED(long TIME_FORCE_RETRIEVED) { + RSSConfig.TIME_FORCE_RETRIEVED =3D TIME_FORCE_RETRIEVED; + } + + public void setDEFAULT_RENDERER_CONFIG(String DEFAULT_RENDERER_CONFIG) { + RSSConfig.DEFAULT_RENDERER_CONFIG =3D new FeedRendererConfig(DEFAULT= _RENDERER_CONFIG); + } + + public void setDEFAULT_NBITEM(int DEFAULT_NBITEM) { + RSSConfig.DEFAULT_NB_ITEM =3D DEFAULT_NBITEM; + } + + public void setDEFAULT_RENDERER_CLASS(Class DEFA= ULT_RENDERER_CLASS) { + RSSConfig.DEFAULT_RENDERER_CLASS =3D DEFAULT_RENDERER_CLASS; + } + + public void setDEFAULT_RESOLVER_CLASS(Class D= EFAULT_RESOLVER_CLASS) { + RSSConfig.DEFAULT_RESOLVER_CLASS =3D DEFAULT_RESOLVER_CLASS; + } + + /** + * @param la classe source de la configuration + */ + public static abstract class RSSConfigInitializer extends ConfigIniti= alizer { + + /** + * Initialise RSSConfig. + * + * @param config la configuration source + */ + public void init(S config) { + RSSHelper.log.info("with source " + config); + super.init(CONFIGURATION_PREFIX_PROPERTY, RSSConfig.class, confi= g, + "TIME_FORCE_RETRIEVED", + "DEFAULT_RENDERER_CONFIG", + "DEFAULT_NB_ITEM", + "DEFAULT_RENDERER_CLASS", + "DEFAULT_RESOLVER_CLASS"); + } + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGenerator.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGenerator.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGenerator.java 2011-01-0= 7 11:42:13 UTC (rev 41) @@ -0,0 +1,344 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSGenerator.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/RSSGenerator.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndFeed; +import com.sun.syndication.io.FeedException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.RandomAccessFile; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.channels.FileChannel; +import java.nio.channels.FileLock; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.EnumMap; +import java.util.EnumSet; +import java.util.Map; + +/** + * generator of rss feeds to be stored in a file + * + * @author tony + */ +public class RSSGenerator { + + /** + * to use log facility, just put in your code: log.info(\"...\"); + */ + static final Log log =3D LogFactory.getLog(RSSGenerator.class); + /** + * date formater use to save date in feed and entries + */ + public static final DateFormat DATE_PARSER =3D new SimpleDateFormat("dd/= MM/yyyy HH:mm:ss"); + + /** + * @return une nouvelle instance de RssHelper en utilisant les implantat= ions + * definies dans RSSGeneratorConfig. + * @throws Exception pour tout pb lors de l'instanciation des objects + */ + public static RSSGenerator newDefaultInstance() throws Exception { + RSSGenerator helper =3D new RSSGenerator(); + return helper; + } + + + /** + * dictonnary of field <-> property for feed + */ + protected final EnumMap feedProperties; + /** + * dictonnary of field <-> property for entry + */ + protected final EnumMap itemProperties; + /** + * directory where feeds are stored + */ + protected final File generatorDirectory; + /** + * feed format to use * + */ + protected final FeedType format; + /** + * number of feed to use by default + */ + protected final int nbItems; + + protected RSSGenerator() { + this(null); + } + + protected RSSGenerator(EnumMap feedProperties, EnumMap itemProperties, File generatorDirectory, FeedType format, int nb= Items) { + this.feedProperties =3D feedProperties; + this.itemProperties =3D itemProperties; + this.generatorDirectory =3D generatorDirectory; + this.format =3D format; + this.nbItems =3D nbItems; + } + + protected RSSGenerator(File generatorDirectory) { + + feedProperties =3D new EnumMap(Field.class); + feedProperties.put(Field.NAME, "title"); + feedProperties.put(Field.LINK, "link"); + // cela engendre des NPE... + feedProperties.put(Field.IMAGE, "image.url"); + feedProperties.put(Field.DESCRIPTION, "description"); + feedProperties.put(Field.AUTHOR, "author"); + feedProperties.put(Field.TIME, "publishedDate"); + feedProperties.put(Field.CATEGORY, "categories"); + + itemProperties =3D new EnumMap(Field.class); + itemProperties.put(Field.NAME, "title"); + itemProperties.put(Field.LINK, "link"); + itemProperties.put(Field.IMAGE, null); + itemProperties.put(Field.DESCRIPTION, "description.value"); + itemProperties.put(Field.AUTHOR, "author"); + itemProperties.put(Field.TIME, "publishedDate"); + + this.generatorDirectory =3D generatorDirectory =3D=3D null ? new Fil= e(RSSGeneratorConfig.GENERATOR_DIRECTORY) : generatorDirectory; + format =3D FeedType.valueOf(RSSGeneratorConfig.DEFAULT_GENERATOR_FOR= MAT); + nbItems =3D RSSGeneratorConfig.DEFAULT_GENERATOR_NB_ITEM; + } + + /** + * @param url location where to create the file + * @param type fromat of feed to create + * @param values properties of the feed + * @throws ParseException if pb while parsing date + * @throws IOException if io pb + * @throws FeedException if pb while creating feed + */ + public void createFeedFile(URL url, FeedType type, Map va= lues) throws IOException, FeedException, ParseException { + if (url =3D=3D null) { + throw new NullPointerException("can not create a feed with null = url"); + } + if (type =3D=3D null) { + throw new NullPointerException("can not create a feed with null = feedtype"); + } + if (values =3D=3D null || values.isEmpty()) { + //TODO Should check mandatory values (title, link,...) + throw new NullPointerException("can not create a feed with null = nor empty values dictonnary"); + } + File f =3D getFile(url); + + if (f.exists()) { + throw new IllegalStateException("feed already existing in " + f.= getName()); + } + + // make sure parent exists + f.getParentFile().mkdirs(); + + // block until can acquire lock + FileLock lock =3D acquireLock(f); + + try { + + SyndFeed feed =3D RSSIOUtil.createFeed(feedProperties, type, val= ues); + + RSSIOUtil.saveFeed(f, feed); + + } catch (FeedException e) { + // file must not be created + f.delete(); + throw e; + } catch (ParseException e) { + // file must not be created + f.delete(); + throw e; + } finally { + releaseLock(f, lock); + } + } + + /** + * Add a item to an existing feed file. + * + * @param url location of feed to used + * @param nbEntries number of maximum entries to be written in feed file + * @param values dictionnary of properties to write + * @throws FeedException if feed pb + * @throws IOException if io pb + * @throws ParseException if dateparser pb + */ + public void addItemToFeedFile(URL url, int nbEntries, Map= values) throws IOException, FeedException, ParseException { + if (url =3D=3D null) { + throw new NullPointerException("can not add a feed's entry with = null url"); + } + if (values =3D=3D null || values.isEmpty()) { + //TODO Should check mandatory values (title, link,...) + throw new NullPointerException("can not add a feed's entry with= null nor empty values dictonnary"); + } + File f =3D getFile(url); + + if (!f.exists()) { + throw new FileNotFoundException("file not existing " + f); + } + + // block until can acquire lock + FileLock lock =3D acquireLock(f); + + try { + // get feed + SyndFeed feed =3D RSSIOUtil.readFeed(url); + + // create item + SyndEntry item =3D RSSIOUtil.createFeedItem(itemProperties, valu= es); + + // add item=20 + feed =3D RSSIOUtil.addItemToFeed(feed, item, nbEntries, values); + + // save feed into a tmp file + File tmpFile =3D new File(f.getAbsolutePath() + "-tmp_" + System= .nanoTime()); + + RSSIOUtil.saveFeed(tmpFile, feed); + + // move tmpFile to real file + tmpFile.renameTo(f); + } finally { + releaseLock(f, lock); + } + } + + public void deleteFeedFile(URL toURL) { + File f =3D getFile(toURL); + if (f.exists() && !f.delete()) { + throw new IllegalStateException("could not delete feed " + f.get= Name()); + } + } + + /** + * @param url + * @param values + * @return the set of modified fields. + * @throws IOException + * @throws FeedException + * @throws ParseException + */ + public EnumSet updateFeedFile(URL url, Map values)= throws IOException, FeedException, ParseException { + if (url =3D=3D null) { + throw new NullPointerException("can not add a feed's entry with = null url"); + } + if (values =3D=3D null || values.isEmpty()) { + //TODO Should check mandatory values (title, link,...) + throw new NullPointerException("can not add a feed's entry with= null nor empty values dictonnary"); + } + File f =3D getFile(url); + + if (!f.exists()) { + throw new FileNotFoundException("file not existing " + f); + } + + // block until can acquire lock + FileLock lock =3D acquireLock(f); + + try { + + SyndFeed feed =3D RSSIOUtil.readFeed(url); + + // update feed and keep trace of modified fields + EnumSet modifieds =3D RSSIOUtil.updateFeed(feed, feedProp= erties, values); + + // save feed into a tmp file + File tmpFile =3D new File(f.getAbsolutePath() + "-tmp_" + System= .nanoTime()); + + RSSIOUtil.saveFeed(tmpFile, feed); + + // move tmpFile to real file + tmpFile.renameTo(f); + + // feed link has changed=20 + return modifieds; + } finally { + releaseLock(f, lock); + } + } + + public FeedType getFormat() { + return format; + } + + public File getFeedFile(String name) { + return new File(getGeneratorDirectory(), name + ".xml"); + } + + public int getNbItems() { + return nbItems; + } + + /** + * Obtain the file from his url location. + * + * @param url location of the file + * @return the file + * @throws IllegalStateException if uri is not sytax valid + */ + protected File getFile(URL url) throws IllegalStateException { + try { + return new File(url.toURI()); + } catch (URISyntaxException e) { + throw new IllegalStateException("could not obtain file from url = " + url, e); + } + } + + protected FileLock acquireLock(File f) throws IOException { + File lockFile =3D getWriteFileLock(f); + + /*if (!lockFile.exists()) lockFile.createNewFile(); */ + // open file for writing only + FileChannel channel =3D new RandomAccessFile(lockFile, "rw").getChan= nel(); + + // block until can acquire lock + + return channel.lock(); + } + + protected File getWriteFileLock(File f) { + return new File(f.getParentFile(), f.getName() + ".wlock"); + } + + protected void releaseLock(File f, FileLock lock) throws IOException { + // release lock + lock.release(); + // close channel + lock.channel().close(); + // delete file lock + File lockFile =3D getWriteFileLock(f); + // delete lock file + lockFile.delete(); + } + + public File getGeneratorDirectory() { + return generatorDirectory; + } + +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorConfig.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorConfig.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorConfig.java 201= 1-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,97 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSGeneratorConfig.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/RSSGeneratorConfig.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import java.io.File; + +/** + * Default Configuration for {@link RSSGenerator}. + * + * @author chemit + */ +public class RSSGeneratorConfig { + + /** + * la propriete de configuration qui definit le prefix a jouter pour scr= uter la configuration + */ + private static final String CONFIGURATION_PREFIX_PROPERTY =3D RSSGenerat= orServlet.class.getSimpleName() + "_configuration_prefix"; + /** + * nombre d'items max =C3=A0 ecrire dans le fichier du flux + */ + public static int DEFAULT_GENERATOR_NB_ITEM =3D 100; + /** + * le format par d=C3=A9faut duflux =C3=A0 g=C3=A9n=C3=A9rer + */ + public static String DEFAULT_GENERATOR_FORMAT =3D "RSS_2_0"; + /** + * le r=C3=A9pertoire o=C3=B9 g=C3=A9n=C3=A9rer les flux + */ + public static String GENERATOR_DIRECTORY =3D "/tmp/rssinclude"; + /** + * le caract=C3=A8re s=C3=A9parateur des listes de m=C3=A9tas (categorie= par exemple) + */ + public static String DEFAULT_LIST_SEPARATOR =3D ";"; + + public void setDEFAULT_GENERATOR_NB_ITEM(int DEFAULT_GENERATOR_NB_ITEM) { + RSSGeneratorConfig.DEFAULT_GENERATOR_NB_ITEM =3D DEFAULT_GENERATOR_N= B_ITEM; + } + + public void setDEFAULT_GENERATOR_FORMAT(String DEFAULT_GENERATOR_FORMAT)= { + RSSGeneratorConfig.DEFAULT_GENERATOR_FORMAT =3D DEFAULT_GENERATOR_FO= RMAT; + } + + public void setGENERATOR_DIRECTORY(String GENERATOR_DIRECTORY) { + RSSGeneratorConfig.GENERATOR_DIRECTORY =3D GENERATOR_DIRECTORY; + } + + public void setDEFAULT_LIST_SEPARATOR(String DEFAULT_LIST_SEPARATOR) { + RSSGeneratorConfig.DEFAULT_LIST_SEPARATOR =3D DEFAULT_LIST_SEPARATOR; + } + + /** + * @param la classe source de la configuration + */ + public static abstract class RssGeneratorConfigInitializer extends Co= nfigInitializer { + + /** + * Initialise RSSGeneratorConfig. + * + * @param config la configuration source + */ + public void init(S config) { + RSSGenerator.log.info("with source " + config); + + super.init(CONFIGURATION_PREFIX_PROPERTY, RSSGeneratorConfig.cla= ss, config, + "DEFAULT_GENERATOR_NB_ITEM", + "DEFAULT_GENERATOR_FORMAT", + "DEFAULT_LIST_SEPARATOR", + "GENERATOR_DIRECTORY"); + + // create delegate directory + new File(GENERATOR_DIRECTORY).mkdirs(); + + } + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorServlet.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorServlet.java 20= 11-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,250 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSGeneratorServlet.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/RSSGeneratorServlet.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndFeed; +import com.sun.syndication.io.FeedException; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.FileFilter; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + *

    + * Servlet permettant de generer des flux generes par RSSGenerator et de + * les publier. + * + * @author chemit + */ +public class RSSGeneratorServlet extends BaseServlet { + + private static final long serialVersionUID =3D 1L; + + public void doCreateFeed(HttpServletRequest request, HttpServletResponse= response, String feedName, File file) throws ServletException, IOException { + String type =3D request.getParameter("feedType"); + FeedType feedType =3D null; + if (type !=3D null) { + try { + feedType =3D FeedType.valueOf(type); + } catch (Exception e) { + feedType =3D null; + } + } + if (feedType =3D=3D null) { + feedType =3D delegate.getFormat(); + } + String description =3D request.getParameter("feedDescription"); + String link =3D request.getParameter("feedLink"); + String author =3D request.getParameter("feedAuthor"); + String categories =3D request.getParameter("feedCategories"); + Map values =3D new HashMap(); + values.put(Field.NAME, feedName); + addFieldValue(Field.DESCRIPTION, description, values); + addFieldValue(Field.LINK, link, values); + addFieldValue(Field.AUTHOR, author, values); + addFieldValue(Field.CATEGORY, categories, values); + values.put(Field.TIME, RSSGenerator.DATE_PARSER.format(new Date())); + try { + delegate.createFeedFile(file.toURI().toURL(), feedType, values); + } catch (Exception ex) { + throw new ServletException(ex); + } + + String redirect =3D request.getParameter("from"); + if (redirect !=3D null) { + response.sendRedirect(redirect); + } + } + + public void doDeleteFeed(HttpServletRequest request, HttpServletResponse= response, String feedName, File file) throws ServletException, IOException { + try { + delegate.deleteFeedFile(file.toURI().toURL()); + } catch (Exception ex) { + throw new ServletException(ex); + } + + String redirect =3D request.getParameter("from"); + if (redirect !=3D null) { + response.sendRedirect(redirect); + } + } + + public void doAddItem(HttpServletRequest request, HttpServletResponse re= sponse, String feedName, File file) throws ServletException, IOException { + + Integer nbItems =3D convertToInt(request.getParameter("nbItems")); + if (nbItems =3D=3D null) { + nbItems =3D RSSGeneratorConfig.DEFAULT_GENERATOR_NB_ITEM; + } + String description =3D request.getParameter("itemDescription"); + String link =3D request.getParameter("itemLink"); + String author =3D request.getParameter("itemAuthor"); + String name =3D request.getParameter("itemName"); + + Map values =3D new HashMap(); + addFieldValue(Field.NAME, name, values); + addFieldValue(Field.DESCRIPTION, description, values); + addFieldValue(Field.LINK, link, values); + addFieldValue(Field.AUTHOR, author, values); + values.put(Field.TIME, RSSGenerator.DATE_PARSER.format(new Date())); + try { + delegate.addItemToFeedFile(file.toURI().toURL(), nbItems, values= ); + } catch (Exception ex) { + throw new ServletException(ex); + } + + String redirect =3D request.getParameter("from"); + if (redirect !=3D null) { + response.sendRedirect(redirect); + } + } + + public void doList(HttpServletResponse response) throws IOException { + // obtain the list of known feeds + File[] files =3D delegate.getGeneratorDirectory().listFiles(new File= Filter() { + + public boolean accept(File pathname) { + return pathname.isFile() && pathname.getName().endsWith(".xm= l"); + } + }); + response.setContentType("text/xml;charset=3DUTF-8"); + PrintWriter out =3D response.getWriter(); + + try { + if (files.length > 0) { + String format =3D ""; + for (File f : files) { + String name =3D f.getName(); + out.println(String.format(format, name.substring(0, name= .length() - 4))); + } + } else { + out.println("no feed generated"= ); + } + } finally { + out.close(); + } + } + + public void doShow(File file, String feedName, HttpServletResponse respo= nse) throws ServletException, IOException { + // no action, just publication + if (!file.exists()) { + throw new ServletException("could not find feed " + feedName); + } + response.setContentType("text/xml;charset=3DUTF-8"); + PrintWriter out =3D response.getWriter(); + try { + SyndFeed feed =3D RSSIOUtil.readFeed(file.toURI().toURL()); + RSSIOUtil.saveFeed(out, feed); + } catch (IllegalArgumentException ex) { + throw new ServletException(ex); + } catch (FeedException ex) { + throw new ServletException(ex); + } finally { + out.close(); + } + } + + @Override + protected ConfigInitializer newConfigInitializer() { + return new RSSGeneratorConfig.RssGeneratorConfigInitializer() { + + protected String getConfigValue(ServletConfig config, String ful= lConfigName) { + return config.getInitParameter(fullConfigName); + } + }; + } + + @Override + protected RSSGenerator newDelegate() throws Exception { + return RSSGenerator.newDefaultInstance(); + } + + /** + * Processes requests for both HTTP GET and POST methods. + * + * @param request servlet request + * @param response servlet response + * @throws IOException TODO + * @throws ServletException TODO + */ + @Override + protected void processRequest(HttpServletRequest request, HttpServletRes= ponse response) + throws ServletException, IOException { + + String action =3D request.getParameter("action"); + if (action =3D=3D null) { + action =3D ""; + } + action =3D action.trim().toLowerCase(); + if ("list".equals(action)) { + doList(response); + return; + } + + String feedName =3D request.getParameter("feedName"); + + if (feedName =3D=3D null || "".equals(feedName)) { + throw new ServletException("could not find feedName parameter"); + } + //feedName =3Dnew String(feedName.getBytes(),0,feedName.length(),Cha= rset.forName("utf-8")); + File file =3D new File(delegate.getGeneratorDirectory(), feedName + = ".xml"); + + if ("show".equals(action)) { + doShow(file, feedName, response); + return; + } + + if ("create".equals(action)) { + doCreateFeed(request, response, feedName, file); + return; + } + + if ("delete".equals(action)) { + doDeleteFeed(request, response, feedName, file); + return; + } + + if ("additem".equals(action)) { + doAddItem(request, response, feedName, file); + return; + } + + throw new ServletException("action '" + action + "' is unknown "); + + } + + protected void addFieldValue(Field field, String value, Map values) { + if (value !=3D null && !"".equals(value.trim())) { + values.put(field, value); + } + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSHelper.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSHelper.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSHelper.java 2011-01-07 1= 1:42:13 UTC (rev 41) @@ -0,0 +1,151 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSHelper.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/RSSHelper.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndFeed; +import org.apache.commons.collections.map.ReferenceMap; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.net.MalformedURLException; +import java.util.List; + +/** + * @author poussin + */ +public class RSSHelper { + + /** + * to use log facility, just put in your code: log.info(\"...\"); + */ + static final Log log =3D LogFactory.getLog(RSSHelper.class); + + /** + * @return une nouvelle instance de RssHelper en utilisant les implantat= ions + * definies dans RSSConfig. + * @throws Exception pour tout pb lors de l'instanciation des objects + */ + public static RSSHelper newDefaultInstance() throws Exception { + FeedURLResolver r =3D RSSConfig.DEFAULT_RESOLVER_CLASS.newInstance(); + FeedRenderer rr =3D RSSConfig.DEFAULT_RENDERER_CLASS.newInstance(); + RSSHelper helper =3D new RSSHelper(r, rr); + return helper; + } + + /** + * La classe permettant de resoudre les urls + */ + protected FeedURLResolver resolver; + /** + * on utilise des soft reference pour eviter de trop utiliser la memoire + * key: String, value: FeedData + */ + protected ReferenceMap feeds =3D new ReferenceMap(ReferenceMap.HARD, Ref= erenceMap.SOFT); + protected FeedRenderer renderer; + + /** + * Utilise un SimpleFeedURLResolver comme resolver de feed + */ + public RSSHelper() { + this(new SimpleFeedURLResolver(), new FeedHTMLRenderer(new HTMLScrip= tCleaner())); + } + + public RSSHelper(FeedURLResolver resolver, FeedRenderer renderer) { + this.resolver =3D resolver; + this.renderer =3D renderer; + } + + public void setResolver(FeedURLResolver resolver) { + this.resolver =3D resolver; + } + + public void setRenderer(FeedRenderer renderer) { + this.renderer =3D renderer; + } + + public FeedRenderer getRenderer() { + return renderer; + } + + public FeedURLResolver getResolver() { + return resolver; + } + + public void removeFeed(String feedName) { + feeds.remove(feedName); + } + + /** + * Permet de recuperer un certain nombre d'item du feed demande + * + * @param feedName nom du feed souhaite, l'url sera resolu avec le= FeedURLResolver + * @param representation indique les champs en sortie souhaites (ex: n-n= t) + * @param nbItem le nombre d'item du feed souhaite + * @param forceReload un flag pour forcer la relecture du feed + * @return le code html representant le feed + */ + public String getHTML(String feedName, String representation, Integer nb= Item, boolean forceReload) { + try { + FeedData feed =3D (FeedData) feeds.get(feedName); + if (forceReload || feed =3D=3D null || feed.getLastRetrived() + = RSSConfig.TIME_FORCE_RETRIEVED < System.currentTimeMillis()) { + feed =3D resolver.resolv(feedName); + if (feed =3D=3D null) { + log.warn("could not find feed for " + feedName); + return "No feed found for " += feedName + ""; + } + feeds.put(feedName, feed); + } + + FeedRendererConfig c; + if (representation !=3D null) { + c =3D new FeedRendererConfig(representation); + } else { + c =3D feed.getRendererConfig(); + } + + int nb; + if (nbItem !=3D null) { + nb =3D nbItem; + } else { + nb =3D feed.getNbItem(); + } + + SyndFeed sf =3D feed.getFeed(); + //TODO Deal with NPE... if feed is null + List syndEntries =3D sf.getEntries(); + if (nb >=3D 0 && syndEntries.size() >=3D nb) { + syndEntries =3D syndEntries.subList(syndEntries.size() - nb,= syndEntries.size()); + } + SyndEntry[] items =3D syndEntries.toArray(new SyndEntry[syndEntr= ies.size()]); + + String result =3D renderer.render(c, sf, items); + return result; + } catch (MalformedURLException eee) { + log.warn("Can't resolv feed url: " + feedName, eee); + return "" + eee.getMessage() + ""; + } + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSIOUtil.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSIOUtil.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSIOUtil.java 2011-01-07 1= 1:42:13 UTC (rev 41) @@ -0,0 +1,259 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSIOUtil.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/RSSIOUtil.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndCategory; +import com.sun.syndication.feed.synd.SyndCategoryImpl; +import com.sun.syndication.feed.synd.SyndContent; +import com.sun.syndication.feed.synd.SyndContentImpl; +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndEntryImpl; +import com.sun.syndication.feed.synd.SyndFeed; +import com.sun.syndication.feed.synd.SyndFeedImpl; +import com.sun.syndication.io.FeedException; +import com.sun.syndication.io.SyndFeedInput; +import com.sun.syndication.io.SyndFeedOutput; +import com.sun.syndication.io.XmlReader; +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.io.File; +import java.io.IOException; +import java.io.Writer; +import java.net.URL; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.EnumMap; +import java.util.EnumSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +/** + * helper to read or save a feed + * + * @author tony + */ +public class RSSIOUtil { + + /** + * to use log facility, just put in your code: log.info(\"...\"); + */ + static final Log log =3D LogFactory.getLog(RSSIOUtil.class); + + /** + * Load a feed from his url + * + * @param url location of feed + * @return the java pojo feed + * @throws IllegalArgumentException + * @throws FeedException + * @throws IOException + */ + public static SyndFeed readFeed(URL url) throws IllegalArgumentException= , FeedException, IOException { + SyndFeedInput input =3D new SyndFeedInput(); + SyndFeed feed =3D input.build(new XmlReader(url)); + return feed; + } + + /** + * save a feed into a file. + * + * @param file + * @param feed + * @throws IOException + * @throws FeedException + */ + public static void saveFeed(File file, SyndFeed feed) throws IOException= , FeedException { + SyndFeedOutput output =3D new SyndFeedOutput(); + output.output(feed, file); + } + + /** + * save a feed into a writer. + * + * @param writer + * @param feed + * @throws IOException + * @throws FeedException + */ + public static void saveFeed(Writer writer, SyndFeed feed) throws IOExcep= tion, FeedException { + SyndFeedOutput output =3D new SyndFeedOutput(); + output.output(feed, writer); + } + + public static SyndFeed createFeed(EnumMap feedProperties,= FeedType type, Map values) throws ParseException { + SyndFeed feed =3D new SyndFeedImpl(); + feed.setFeedType(type.getType()); + feed.setEncoding("utf-8"); + fillFeed(values, feedProperties, feed, false); + return feed; + } + + public static EnumSet updateFeed(URL url, EnumMap = feedProperties, Map values) throws ParseException, IllegalArgu= mentException, FeedException, IOException { + SyndFeed feed =3D RSSIOUtil.readFeed(url); + return updateFeed(feed, feedProperties, values); + } + + public static EnumSet updateFeed(SyndFeed feed, EnumMap feedProperties, Map values) throws ParseException, Illeg= alArgumentException, FeedException, IOException { + EnumSet modifieds =3D fillFeed(values, feedProperties, feed, = true); + return modifieds; + } + + @SuppressWarnings({"unchecked"}) + protected static SyndFeed addItemToFeed(SyndFeed feed, SyndEntry item, i= nt nbEntries, Map values) throws IOException, IllegalArgumentE= xception, FeedException, ParseException { + List entries =3D feed.getEntries(); + if (!entries.isEmpty()) { + // always sort by publication date + Collections.sort(entries, new FeedEntryComparator()); + // keep only nbEntries -1 entries + while (entries.size() > nbEntries - 1) { + entries.remove(0); + } + } + entries.add(item); + if (log.isDebugEnabled()) { + log.debug("new item " + item); + } + return feed; + } + + public static SyndEntry createFeedItem(EnumMap itemProper= ties, Map values) throws ParseException { + + SyndEntry feedEntry =3D new SyndEntryImpl(); + + for (Entry entry : values.entrySet()) { + Field field =3D entry.getKey(); + String name =3D itemProperties.get(field); + if (name =3D=3D null) { + // this field is not managed + log.warn("the field " + field + " is not managed in item"); + continue; + } + Object value =3D entry.getValue(); + Object realValue; + switch (field) { + case TIME: + realValue =3D RSSGenerator.DATE_PARSER.parse((String) va= lue); + break; + case DESCRIPTION: + //TODO Deal with xml content ? + SyndContent description =3D new SyndContentImpl(); + description.setType("text/plain"); + feedEntry.setDescription(description); + realValue =3D String.valueOf(value); + break; + default: + realValue =3D value; + } + setFieldValue(feedEntry, name, realValue); + } + + return feedEntry; + } + + protected static EnumSet fillFeed(Map values, Enum= Map feedProperties, SyndFeed feed, boolean treateModfied) thro= ws ParseException { + EnumSet modifieds =3D EnumSet.noneOf(Field.class); + + for (Entry entry : values.entrySet()) { + Field field =3D entry.getKey(); + String name =3D feedProperties.get(field); + if (name =3D=3D null) { + // this field is not managed + log.warn("the field " + field + " is not managed in feed"); + continue; + } + Object value =3D entry.getValue(); + Object realValue; + switch (field) { + case TIME: + realValue =3D RSSGenerator.DATE_PARSER.parse((String) va= lue); + break; + case CATEGORY: + List categoriesAsList =3D new ArrayList(= ); + if (value instanceof List) { + categoriesAsList =3D (List) value; + } else { + // categories as String + String cats =3D String.valueOf(value); + String[] categories =3D cats.split(RSSGeneratorConfi= g.DEFAULT_LIST_SEPARATOR); + categoriesAsList =3D Arrays.asList(categories); + } + realValue =3D new ArrayList(); + for (String cat : categoriesAsList) { + SyndCategory scat =3D new SyndCategoryImpl(); + scat.setName(cat); + ((List) realValue).add(scat); + } + break; + default: + realValue =3D value; + } + if (treateModfied) { + Object oldValue =3D getFieldValue(feed, name); + if (oldValue =3D=3D null) { + if (realValue !=3D null) { + modifieds.add(field); + } + } else { + if (!oldValue.equals(realValue)) { + modifieds.add(field); + } + } + } + setFieldValue(feed, name, realValue); + } + return modifieds; + } + + protected static void setFieldValue(Object dst, String name, Object valu= e) { + if (value =3D=3D null) { + // null value is not managed + log.warn("null value for field " + name + " is not managed"); + return; + } + try { + BeanUtils.setProperty(dst, name, value); + } catch (Exception ex) { + log.warn("could not access property " + name, ex); + } + } + + protected static Object getFieldValue(Object dst, String name) { + try { + return BeanUtils.getProperty(dst, name); + } catch (Exception ex) { + log.warn("could not access property " + name, ex); + return null; + } + } + + protected RSSIOUtil() { + // no instance + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSServlet.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSServlet.java 2011-01-07 = 11:42:13 UTC (rev 41) @@ -0,0 +1,183 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSServlet.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/RSSServlet.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; + +/** + *

    + * Servlet permettant de retourner un feed RSSHelper en une representation H= TML. + * Si la servlet est appele sans parametre alors le code JS permettant d'uti= liser + * cette servlet en Ajax est retourne. + *

    + * Sinon la servlet peut prendre en parametre: + *

  • feedName: le nom du feed souhaite + *
  • nbItem: le nombre d'item du feed a retourner + *
  • feedRepr: le chaine permettant de connaitre les champs du feed voulu + *

    + * Utilisation dans une page HTML. Dans le header ajouter + *

    + *   <script src=3D"url/to/RSSServlet"></script>
    + * 
    + * Dans le corps placer un element div avec un id particulier. + * Et soit a la fin de la page soit juste apres le div, ajouter le script + *
    + * rssinclude('feedName', 'divid', 5, 'n-n');
    + * 
    + *

    + * + * @author poussin + */ +public class RSSServlet extends BaseServlet { + + /** + * Le code JavaScript a utilise dans les pages clientes + *

    + * Provient du fichier rssinclude.js + * cat rssinclude.js |sed 's/"/\\"/g' |sed -re 's/^(.*)$/"\1\\n" +/' + */ + protected static String js =3D + "function rssincludeUpdateDiv(div, background) {\n" + + " // mettre background a false est utile lorsque l'on= appelle la methode\n" + + " // depuis une fenetre que l'on ferme ensuite\n" + + " var serlvetUrl =3D \"%1$s\"; \n" + + " win =3D window;\n" + + " var xhr =3D null;\n" + + " var error=3Dnull;\n" + + " var feedName =3D div.getAttribute(\"feedName\");\n"= + + " if (!feedName) // pas de feed name, fatal error\n" + + " error =3D \"Aucun fe= ed name detecte...\"; \n" + + " else if(win.XMLHttpRequest) // Firefox, Opera detec= ted\n" + + " xhr =3D new win.XMLHttpRequest();\n" + + " else if(win.ActiveXObject) // Internet Explorer det= ected\n" + + " xhr =3D new win.ActiveXObject(\"Microsoft.XMLHT= TP\");\n" + + " else // XMLHttpRequest non supporte par le navigat= eur\n" + + " error =3D \"Votre na= vigateur ne supporte pas les objets XMLHTTPRequest...\"; \n" + + " if (!!error) { div.innerHTML =3D error; return; } \= n" + + " \n" + + " var nbItem =3D div.getAttribute(\"nbItem\");\n" + + " var feedRepr =3D div.getAttribute(\"feedRepr\"); = \n" + + " var forceReload =3D div.getAttribute(\"forceReload\= "); \n" + + " var url =3D serlvetUrl+(serlvetUrl.indexOf('?')>-1?= '&':'?')+\"feedName=3D\" + escape(feedName); \n" + + " if (!!nbItem) {url +=3D '&nbItem=3D' + escape(nbIte= m);} \n" + + " if (!!feedRepr) {url +=3D '&feedRepr=3D' + escape(f= eedRepr);}\n" + + " if (!!forceReload) {url +=3D '&forceReload=3Dtrue';= }\n" + + "\n" + + " xhr.open(\"GET\", url, !!background);\n" + + " xhr.onreadystatechange =3D function() {\n" + + " if(xhr.readyState =3D=3D 1) div.innerHTML =3D \= "Chargement du flux '\"+feedName+\"'\";\n" + + " if(xhr.readyState =3D=3D 4) div.innerHTML =3D x= hr.responseText;\n" + + " }\n" + + " xhr.send(null);\n" + + "}\n" + + "var initRss =3Dfunction () {\n" + + " var divs =3D document.getElementsByTagName(\"div\")= ; \n" + + " var i =3D 0;var max=3Ddivs.length; \n" + + " var toTreate =3D [];\n" + + " while (i < max) {\n" + + " var div =3D divs[i++];\n" + + " if (div.getAttribute('name')=3D=3D'rssinclude')= toTreate[toTreate.length] =3D div;\n" + + " }\n" + + " i=3D0;max =3D toTreate.length;\n" + + " while (i newConfigInitializer() { + return new RSSConfig.RSSConfigInitializer() { + + protected String getConfigValue(ServletConfig config, String ful= lConfigName) { + return config.getInitParameter(fullConfigName); + } + }; + } + + @Override + protected RSSHelper newDelegate() throws Exception { + return RSSHelper.newDefaultInstance(); + } + + /** + * Processes requests for both HTTP GET and POST methods. + * + * @param request servlet request + * @param response servlet response + * @throws IOException TODO + * @throws ServletException TODO + */ + @Override + protected void processRequest(HttpServletRequest request, HttpServletRes= ponse response) + throws ServletException, IOException { + String feedName =3D request.getParameter("feedName"); + if (feedName =3D=3D null || "".equals(feedName)) { + doJs(response, request); + } else { + doRender(response, request, feedName); + } + } +} Added: trunk/nuiton-rss/src/main/java/org/nuiton/rss/SimpleFeedURLResolver.ja= va =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/java/org/nuiton/rss/SimpleFeedURLResolver.java = (rev 0) +++ trunk/nuiton-rss/src/main/java/org/nuiton/rss/SimpleFeedURLResolver.java = 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,46 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: SimpleFeedURLResolver.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/mai= n/java/org/nuiton/rss/SimpleFeedURLResolver.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import java.net.MalformedURLException; +import java.net.URL; + +/** + * Par defaut retourne un FeedData ou la chaine passer est convertie en URL, + * le nombre d'item est positionne a -1 et le renderer a n-natd + * + * @author poussin + */ +public class SimpleFeedURLResolver implements FeedURLResolver { + + public FeedData resolv(String ask) throws MalformedURLException { + URL url =3D new URL(ask); + FeedData result =3D new FeedData(url); + result.setNbItem(RSSConfig.DEFAULT_NB_ITEM); + result.setRendererConfig(RSSConfig.DEFAULT_RENDERER_CONFIG); + return result; + } + +} Added: trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclud= e/README.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/R= EADME.txt (rev 0) +++ trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/R= EADME.txt 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,15 @@ +This plugin was developped by Code Lutin + +Installation Instructions +1. Copy rssinclude directory into "editor/plugins/" + +2. Copy myfckconfig.js in fckeditor root path and customize it (or merge the= =20 + content in your already customized config...) + +3. To create an editor use this code + +var oFCKeditor =3D new FCKeditor( 'editorName' ) ; =20 +oFCKeditor.Config["CustomConfigurationsPath"] =3D oFCKeditor.BasePath+"/myfc= kconfig.js"; +oFCKeditor.Create() ; + +Please let me know if you experience any issues. Added: trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclud= e/button.rss.gif =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: trunk/nuiton-rss/src/main/resources/fckeditor/editor/plu= gins/rssinclude/button.rss.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclud= e/fck_rssinclude.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/f= ck_rssinclude.html (rev 0) +++ trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/f= ck_rssinclude.html 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,207 @@ + + + + + + Rss Include Properties + + + + + + + + + + +

    Test RSS Generator

    + + + + + +
    +
    +
    +    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    feedName (*) : +
    feedDescription (*) :
    feedLink (*) : +
    feedAuthor : +
    feedCategories :
    (*)  Mandatory + field +
    +
    +
    +
    +
    +
    +     +   + + + + + + + + + + + + + + + + + + + + + + + + +
    feedName : +
    +
    itemName : +
    itemDescription:
    itemLink : +
    itemAuthor : +
    +
    +
    +
    + + + Added: trunk/nuiton-rss/src/main/webapp/testRender.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/main/webapp/testRender.html = (rev 0) +++ trunk/nuiton-rss/src/main/webapp/testRender.html 2011-01-07 11:42:13 UTC = (rev 41) @@ -0,0 +1,60 @@ + + + + + + Page de test rss + + + + + +

    Test RSS

    + +
    +
    +
    +
    +
    +
    + + Added: trunk/nuiton-rss/src/site/apt/index.apt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/site/apt/index.apt (rev 0) +++ trunk/nuiton-rss/src/site/apt/index.apt 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,50 @@ +~~~ +~~ #%L +~~ Nuiton Utils :: Nuiton RSS +~~=20 +~~ $Id: index.apt 2001 2010-12-30 11:25:14Z tchemit $ +~~ $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/sit= e/apt/index.apt $ +~~ %% +~~ Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin +~~ %% +~~ This program is free software: you can redistribute it and/or modify +~~ it under the terms of the GNU Lesser General Public License as=20 +~~ published by the Free Software Foundation, either version 3 of the=20 +~~ License, or (at your option) any later version. +~~=20 +~~ This program is distributed in the hope that it will be useful, +~~ but WITHOUT ANY WARRANTY; without even the implied warranty of +~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +~~ GNU General Lesser Public License for more details. +~~=20 +~~ You should have received a copy of the GNU General Lesser Public=20 +~~ License along with this program. If not, see +~~ . +~~ #L% +~~~ + ---- + Nuiton RSS + ---- + ---- + 2009-08-23 + ---- + =20 +Pr=C3=A9sentation + + A faire... + +Utilisation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + + A faire ... + +----------------------------------------------------------------------------= ---- + +
    +----------------------------------------------------------------------------= ---- + +- si pas de fichier html pour l'url demand=C3=A9e ou plus vielle que N + - r=C3=A9cup=C3=A9ration de de l'url et sauvegarde en html +- renvoi du html \ No newline at end of file Added: trunk/nuiton-rss/src/site/site_fr.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/site/site_fr.xml (rev 0) +++ trunk/nuiton-rss/src/site/site_fr.xml 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,62 @@ + + + + + + + + ${project.name} + index.html + + + + + + + + +
    + + + + + + + + + + + + + + + Added: trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSGeneratorHelperTest.j= ava =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSGeneratorHelperTest.java= (rev 0) +++ trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSGeneratorHelperTest.java= 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,234 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSGeneratorHelperTest.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/tes= t/java/org/nuiton/rss/RSSGeneratorHelperTest.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import com.sun.syndication.feed.synd.SyndCategory; +import com.sun.syndication.feed.synd.SyndEntry; +import com.sun.syndication.feed.synd.SyndFeed; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import java.io.File; +import java.net.MalformedURLException; +import java.text.ParseException; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author tony + */ +public class RSSGeneratorHelperTest { + + private static Log log =3D LogFactory.getLog(RSSGeneratorHelperTest.clas= s); + + static RSSGenerator helper; + static File f; + + @Before + public void setUp() throws Exception { + if (helper =3D=3D null) { + helper =3D RSSGenerator.newDefaultInstance(); + } + if (f =3D=3D null) { + f =3D getFeedFile(); + } + } + + @Test + public void testCreateFeed() throws Exception { + + Map values =3D new HashMap(); + values.put(Field.NAME, "feedName : " + f.getName()); + values.put(Field.DESCRIPTION, "feedDescription : " + f.getName()); + values.put(Field.LINK, f.toURI().toURL() + ""); + values.put(Field.AUTHOR, "feed author"); + values.put(Field.CATEGORY, Arrays.asList("categorie1", "categorie2")= ); + values.put(Field.TIME, RSSGenerator.DATE_PARSER.format(new Date())); + + Assert.assertFalse(f.exists()); + if (log.isInfoEnabled()) { + log.info("feedFile : " + f); + } + helper.createFeedFile(f.toURI().toURL(), helper.getFormat(), values); + // no lock + Assert.assertFalse(helper.getWriteFileLock(f).exists()); + // file exist + Assert.assertTrue(f.exists()); + + SyndFeed feed =3D RSSIOUtil.readFeed(f.toURI().toURL()); + + if (log.isDebugEnabled()) { + log.debug(feed); + } + + Assert.assertEquals(feed.getFeedType(), helper.getFormat().getType()= ); + Assert.assertEquals(feed.getLink(), values.get(Field.LINK)); + Assert.assertEquals(feed.getTitle(), values.get(Field.NAME)); + Assert.assertEquals(feed.getDescription(), values.get(Field.DESCRIPT= ION)); + Assert.assertEquals(feed.getAuthor(), values.get(Field.AUTHOR)); + List cats =3D (List) values.get(Field.CATEGORY); + for (Object o : feed.getCategories()) { + SyndCategory cat =3D (SyndCategory) o; + Assert.assertTrue(cats.contains(cat.getName())); + } + Assert.assertEquals(feed.getPublishedDate(), RSSGenerator.DATE_PARSE= R.parse((String) values.get(Field.TIME))); + + } + + @Test + public void testCreateFeedAlreadyExisting() throws Exception { + + Map values =3D new HashMap(); + values.put(Field.NAME, "feedName : " + f.getName()); + values.put(Field.DESCRIPTION, "feedDescription : " + f.getName()); + values.put(Field.LINK, f.toURI().toURL() + ""); + values.put(Field.TIME, RSSGenerator.DATE_PARSER.format(new Date())); + + Assert.assertTrue(f.exists()); + + try { + helper.createFeedFile(f.toURI().toURL(), helper.getFormat(), val= ues); + // file already exist, can not reach this code + Assert.fail(); + } catch (IllegalStateException e) { + Assert.assertTrue(true); + } + // no write lock + Assert.assertFalse(helper.getWriteFileLock(f).exists()); + + } + + @Test + public void testAddFeedEntry() throws Exception { + Assert.assertTrue(f.exists()); + Map values =3D createEntry(0); + + helper.addItemToFeedFile(f.toURI().toURL(), 2, values); + + SyndFeed feed =3D RSSIOUtil.readFeed(f.toURI().toURL()); + + List entries =3D feed.getEntries(); + Assert.assertEquals(1, entries.size()); + + if (log.isDebugEnabled()) { + log.debug(feed); + } + + SyndEntry entry =3D (SyndEntry) entries.get(0); + + assertEntry(entry, values); + } + + @Test + public void testAddFeedEntryToMax() throws Exception { + + Assert.assertTrue(f.exists()); + SyndFeed feed =3D RSSIOUtil.readFeed(f.toURI().toURL()); + + List entries =3D feed.getEntries(); + Assert.assertEquals(1, entries.size()); + SyndEntry firsEntry =3D (SyndEntry) entries.get(0); + + Map values; + + int nbMaxEntries =3D 10; + + for (int i =3D 1; i < nbMaxEntries; i++) { + values =3D createEntry(i); + helper.addItemToFeedFile(f.toURI().toURL(), nbMaxEntries, values= ); + feed =3D RSSIOUtil.readFeed(f.toURI().toURL()); + + entries =3D feed.getEntries(); + Assert.assertEquals(i + 1, entries.size()); + + SyndEntry entry =3D (SyndEntry) entries.get(i); + + assertEntry(entry, values); + } + + // feed file contains max items + + values =3D createEntry(nbMaxEntries); + + helper.addItemToFeedFile(f.toURI().toURL(), nbMaxEntries, values); + + feed =3D RSSIOUtil.readFeed(f.toURI().toURL()); + + entries =3D feed.getEntries(); + + Assert.assertEquals(nbMaxEntries, entries.size()); + + SyndEntry entry =3D (SyndEntry) entries.get(nbMaxEntries - 1); + + assertEntry(entry, values); + + // check orginal first entry is no more present + entry =3D (SyndEntry) entries.get(0); + Assert.assertFalse(firsEntry.getTitle().equals(entry.getTitle())); + } + + @Test + public void testCleanFile() throws Exception { + try { + Assert.assertNotNull(f); + Assert.assertTrue(f.exists()); + // lock is delete + Assert.assertFalse(helper.getWriteFileLock(f).exists()); + } finally { + if (f !=3D null) { + f.deleteOnExit(); + } + } + } + + protected void assertEntry(SyndEntry entry, Map values) t= hrows ParseException { + Assert.assertEquals(entry.getLink(), values.get(Field.LINK)); + Assert.assertEquals(entry.getTitle(), values.get(Field.NAME)); + Assert.assertEquals(entry.getDescription().getValue(), values.get(Fi= eld.DESCRIPTION)); + Assert.assertEquals(entry.getAuthor(), values.get(Field.AUTHOR)); + Assert.assertEquals(entry.getPublishedDate(), RSSGenerator.DATE_PARS= ER.parse((String) values.get(Field.TIME))); + } + + protected File getFeedFile() { + return helper.getFeedFile(getClass().getSimpleName() + "-" + System.= nanoTime()); + } + + protected Map createEntry(int number) throws MalformedURL= Exception { + Map values =3D new HashMap(); + values.put(Field.NAME, "entryName : " + f.getName() + "-" + number); + values.put(Field.DESCRIPTION, "entryDescription : " + f.getName() + = "-" + number); + values.put(Field.AUTHOR, "author-" + number); + values.put(Field.LINK, f.toURI().toURL() + "/entry-" + number); + values.put(Field.TIME, RSSGenerator.DATE_PARSER.format(new Date())); + return values; + } + +} Added: trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSTest.java = (rev 0) +++ trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSTest.java 2011-01-07 11:= 42:13 UTC (rev 41) @@ -0,0 +1,112 @@ +/* + * #%L + * Nuiton Utils :: Nuiton RSS + *=20 + * $Id: RSSTest.java 2001 2010-12-30 11:25:14Z tchemit $ + * $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/tes= t/java/org/nuiton/rss/RSSTest.java $ + * %% + * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.rss; + +import org.apache.commons.beanutils.BeanUtils; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author poussin + */ +public class RSSTest { + + @Test + public void testBeanUtils() throws Exception { +// RSSConfig.class.getField("TIME_FORCE_RETRIEVED").set(null, 10); + System.out.println("TIME:" + RSSConfig.TIME_FORCE_RETRIEVED); + System.out.println("RENDER:" + RSSConfig.DEFAULT_RENDERER_CLASS); + BeanUtils.setProperty(new RSSConfig(), "TIME_FORCE_RETRIEVED", "10"); + BeanUtils.setProperty(new RSSConfig(), "DEFAULT_RENDERER_CLASS", Fee= dRenderer.class.getName()); + System.out.println("TIME:" + RSSConfig.TIME_FORCE_RETRIEVED); + System.out.println("RENDER:" + RSSConfig.DEFAULT_RENDERER_CLASS); + Assert.assertEquals("java.lang.String", BeanUtils.getProperty("Objec= t", "class.name")); + } + + @Test + public void testCleaner() throws Exception { + String s =3D "debutmili= eufin"; + + HTMLCleaner cleaner =3D new HTMLScriptCleaner(); + Assert.assertEquals("debutmilieufin", cleaner.clean(s)); + } + + @Test + public void testRendererConfig() throws Exception { + FeedRendererConfig c =3D new FeedRendererConfig("indat-ndat"); + + List l1 =3D new ArrayList(); + l1.add(Field.IMAGE); + l1.add(Field.NAME); + l1.add(Field.DESCRIPTION); + l1.add(Field.AUTHOR); + l1.add(Field.TIME); + + List l2 =3D new ArrayList(); + l2.add(Field.NAME); + l2.add(Field.DESCRIPTION); + l2.add(Field.AUTHOR); + l2.add(Field.TIME); + + Assert.assertEquals(l1, c.getFeedFieldOrder()); + Assert.assertEquals(l2, c.getItemFieldOrder()); + Assert.assertEquals("indat-ndat", c.getString()); + } + + /** + * Test of getHTML method, of class RSSHelper. + * TODO do the test, for the moment, do not launch it... + * + * @throws Exception if any pb + */ + @Ignore + public void testGetHTML() throws Exception { + System.out.println("getHTML"); + String feedName =3D "http://localhost/rss/rss_1.0.xml"; + String feedRepr =3D "n-ndat"; + int nbItem =3D -1; + RSSHelper instance =3D new RSSHelper(); + String expResult =3D ""; + String result =3D instance.getHTML(feedName, feedRepr, nbItem, false= ); + System.out.println("***" + result); + result =3D instance.getHTML(feedName, feedRepr, nbItem, false); + System.out.println("***" + result); + + Thread.sleep(2000); + + result =3D instance.getHTML(feedName, feedRepr, nbItem, false); + System.out.println("***" + result); + result =3D instance.getHTML(feedName, feedRepr, nbItem, false); + System.out.println("***" + result); + // assertEquals(expResult, result); + // TODO review the generated test code and remove the default call t= o fail. +// fail("The test case is a prototype."); + } + +} Added: trunk/nuiton-rss/src/test/java/resources/log4j.properties =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/src/test/java/resources/log4j.properties = (rev 0) +++ trunk/nuiton-rss/src/test/java/resources/log4j.properties 2011-01-07 11:4= 2:13 UTC (rev 41) @@ -0,0 +1,31 @@ +### +# #%L +# Nuiton Utils :: Nuiton RSS +#=20 +# $Id: log4j.properties 2001 2010-12-30 11:25:14Z tchemit $ +# $HeadURL: http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-rss/src/test= /java/resources/log4j.properties $ +# %% +# Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit, Benjamin Poussin +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as=20 +# published by the Free Software Foundation, either version 3 of the=20 +# License, or (at your option) any later version. +#=20 +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Lesser Public License for more details. +#=20 +# You should have received a copy of the GNU General Lesser Public=20 +# License along with this program. If not, see +# . +# #L% +### +# Global logging configuration +log4j.rootLogger=3DDEBUG, stdout + +# Console output... +log4j.appender.stdout=3Dorg.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=3Dorg.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=3D%d{yyyy/MM/dd hh:mm:ss} %5p= (%F:%L) %m%n Modified: trunk/nuiton-tapestry/changelog.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/changelog.txt 2011-01-07 11:05:53 UTC (rev 40) +++ trunk/nuiton-tapestry/changelog.txt 2011-01-07 11:42:13 UTC (rev 41) @@ -0,0 +1,2 @@ +Please refer to the release note : + http://maven-site.nuiton.org/nuiton-tapestry/changes-report.html \ No newline at end of file Modified: trunk/nuiton-tapestry/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/pom.xml 2011-01-07 11:05:53 UTC (rev 40) +++ trunk/nuiton-tapestry/pom.xml 2011-01-07 11:42:13 UTC (rev 41) @@ -55,7 +55,7 @@ =20 - Nuiton-web :: Tapestry + Nuiton Web :: Nuiton Tapestry Extra classes for Tapestry based applications =20 Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2011-01-07 11:05:53 UTC (rev 40) +++ trunk/pom.xml 2011-01-07 11:42:13 UTC (rev 41) @@ -21,7 +21,7 @@ =20 nuiton-tapestry - + nuiton-rss =20 @@ -38,7 +38,6 @@ org.apache.tapestry tapestry-core ${tapestryVersion} - compile jboss @@ -48,10 +47,27 @@ =20 + org.jdom + jdom + ${jdomVersion} + + + + rome + rome + ${romeVersion} + + + jdom + jdom + + + + + org.slf4j slf4j-api ${slf4jVersion} - compile org.slf4j @@ -60,6 +76,13 @@ runtime =20 + + javax.servlet + servlet-api + ${servletVersion} + provided + + =20 @@ -68,7 +91,7 @@ =20 - Nuiton-web + Nuiton Web Common ressources for web applications 2010 http://maven-site.nuiton.org/nuiton-web/ @@ -108,11 +131,18 @@ nuiton-web =20 - + 1.5.3 + + 5.2.4 - 1.5.3 1.6.1 =20 + + 0.9 + 1.1 + + 2.5 + en,fr =20 --===============1390197112115141685==-- From fdesbois@users.nuiton.org Fri Jan 7 13:39:32 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r42 - in trunk/nuiton-tapestry/src/main: java/org/nuiton/web/tapestry5/annotations java/org/nuiton/web/tapestry5/components java/org/nuiton/web/tapestry5/data java/org/nuiton/web/tapestry5/services resources/org/nuiton/web/tapestry5/components Date: Fri, 07 Jan 2011 13:39:32 +0100 Message-ID: <20110107123932.1982015BDE@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8737102761642937974==" --===============8737102761642937974== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: fdesbois Date: 2011-01-07 13:39:32 +0100 (Fri, 07 Jan 2011) New Revision: 42 Url: http://nuiton.org/repositories/revision/nuiton-web/42 Log: - clean headers - #1199 : remove subForm Removed: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/Su= bForm.java trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/componen= ts/SubForm.tml Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/R= equiresAuthentication.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/Fe= edBack.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstract= MappedGridDataSource.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abst= ractAuthenticationFilter.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Form= atBinding.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Form= atBindingFactory.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nuit= onModule.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Serv= iceAuthentication.java Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annota= tions/RequiresAuthentication.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/= RequiresAuthentication.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/= RequiresAuthentication.java 2011-01-07 12:39:32 UTC (rev 42) @@ -13,7 +13,7 @@ * Created: 3 mai 2010 * * @author fdesbois - * $Id$ + * @version $Id$ */ @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/compon= ents/FeedBack.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/F= eedBack.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/F= eedBack.java 2011-01-07 12:39:32 UTC (rev 42) @@ -49,6 +49,7 @@ * * * @author rannou + * @author fdesbois * @version $Id$ */ @IncludeStylesheet("feedback.css") Deleted: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/compone= nts/SubForm.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/S= ubForm.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/S= ubForm.java 2011-01-07 12:39:32 UTC (rev 42) @@ -1,40 +0,0 @@ -package org.nuiton.web.tapestry5.components; - -import org.apache.tapestry5.Block; -import org.apache.tapestry5.annotations.Parameter; -import org.apache.tapestry5.ioc.annotations.Inject; -import org.slf4j.Logger; - -/** - * Created: 14 mai 2010 - * - * @author fdesbois - * @version $Id: SubForm.java 3003 2010-05-19 18:25:58Z fdesbois $ - * @deprecated since 0.2, will be removed in next version. Useless since Sel= ect - * component could have zone in Tapestry 5.2 - */ -@Deprecated -public class SubForm { - - @Parameter - private boolean visible; - - @Inject - private Logger logger; - - @Inject - private Block formBlock; - - @Inject - private Block noFormBlock; - - public Block getActiveBlock() { - if (logger.isDebugEnabled()) { - logger.debug("form already visible : " + visible); - } - if (visible) { - return formBlock; - } - return noFormBlock; - } -} \ No newline at end of file Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/A= bstractMappedGridDataSource.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstrac= tMappedGridDataSource.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstrac= tMappedGridDataSource.java 2011-01-07 12:39:32 UTC (rev 42) @@ -22,6 +22,7 @@ * @param Type of the map key * @param Type of the map value * @author fdesbois + * @version $Id$ */ public abstract class AbstractMappedGridDataSource implements GridDataSource { Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/AbstractAuthenticationFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abs= tractAuthenticationFilter.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abs= tractAuthenticationFilter.java 2011-01-07 12:39:32 UTC (rev 42) @@ -23,7 +23,7 @@ * @param type of User * @param type of Annotation that manage authentication on pages/compone= nts * @author fdesbois - * $Id$ + * @version $Id$ */ public abstract class AbstractAuthenticationFilter implements ComponentRequestFilter { Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBinding.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBinding.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBinding.java 2011-01-07 12:39:32 UTC (rev 42) @@ -18,7 +18,7 @@ * Created: 27 avr. 2010 * * @author fdesbois - * $Id$ + * @version $Id$ * @see FormatBindingFactory */ public class FormatBinding extends AbstractBinding { Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBindingFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBindingFactory.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBindingFactory.java 2011-01-07 12:39:32 UTC (rev 42) @@ -26,7 +26,7 @@ * Created: 27 avr. 2010 * * @author fdesbois - * $Id$ + * @version $Id$ */ public class FormatBindingFactory implements BindingFactory { Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/NuitonModule.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nui= tonModule.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nui= tonModule.java 2011-01-07 12:39:32 UTC (rev 42) @@ -12,7 +12,7 @@ * Created: 4 mai 2010 * * @author fdesbois - * $Id$ + * @version $Id$ */ public class NuitonModule { =20 Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthentication.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthentication.java 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthentication.java 2011-01-07 12:39:32 UTC (rev 42) @@ -47,7 +47,7 @@ * * @param user type * @author fdesbois - * $Id$ + * @version $Id$ */ public interface ServiceAuthentication { =20 Deleted: trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/co= mponents/SubForm.tml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/compone= nts/SubForm.tml 2011-01-07 11:42:13 UTC (rev 41) +++ trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/compone= nts/SubForm.tml 2011-01-07 12:39:32 UTC (rev 42) @@ -1,16 +0,0 @@ - - - - - -
    - - -
    - - - - - \ No newline at end of file --===============8737102761642937974==-- From fdesbois@users.nuiton.org Fri Jan 7 13:59:26 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r43 - in trunk: . nuiton-tapestry Date: Fri, 07 Jan 2011 13:59:26 +0100 Message-ID: <20110107125926.4649715BDE@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7123334226135310925==" --===============7123334226135310925== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: fdesbois Date: 2011-01-07 13:59:26 +0100 (Fri, 07 Jan 2011) New Revision: 43 Url: http://nuiton.org/repositories/revision/nuiton-web/43 Log: Improve dependencies Modified: trunk/nuiton-tapestry/pom.xml trunk/pom.xml Modified: trunk/nuiton-tapestry/pom.xml =================================================================== --- trunk/nuiton-tapestry/pom.xml 2011-01-07 12:39:32 UTC (rev 42) +++ trunk/nuiton-tapestry/pom.xml 2011-01-07 12:59:26 UTC (rev 43) @@ -25,8 +25,8 @@ - org.nuiton - nuiton-utils + commons-collections + commons-collections @@ -35,6 +35,16 @@ + org.apache.tapestry + tapestry-ioc + + + + org.apache.tapestry + tapestry5-annotations + + + org.slf4j slf4j-api Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-07 12:39:32 UTC (rev 42) +++ trunk/pom.xml 2011-01-07 12:59:26 UTC (rev 43) @@ -28,13 +28,8 @@ + - org.nuiton - nuiton-utils - ${nuitonUtilsVersion} - - - org.apache.tapestry tapestry-core ${tapestryVersion} @@ -47,23 +42,18 @@ - org.jdom - jdom - ${jdomVersion} + org.apache.tapestry + tapestry-ioc + ${tapestryVersion} - rome - rome - ${romeVersion} - - - jdom - jdom - - + org.apache.tapestry + tapestry5-annotations + ${tapestryVersion} + org.slf4j slf4j-api @@ -76,10 +66,30 @@ runtime + + org.jdom + jdom + 1.1 + + + + rome + rome + 0.9 + + + jdom + jdom + + + + + + javax.servlet servlet-api - ${servletVersion} + 2.5 provided @@ -137,12 +147,6 @@ 5.2.4 1.6.1 - - 0.9 - 1.1 - - 2.5 - en,fr --===============7123334226135310925==-- From fdesbois@users.nuiton.org Fri Jan 7 13:59:52 2011 From: fdesbois@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r44 - trunk Date: Fri, 07 Jan 2011 13:59:52 +0100 Message-ID: <20110107125952.9A41315BF3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1319085516267427426==" --===============1319085516267427426== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: fdesbois Date: 2011-01-07 13:59:52 +0100 (Fri, 07 Jan 2011) New Revision: 44 Url: http://nuiton.org/repositories/revision/nuiton-web/44 Log: Useless version, nuiton-utils is not used Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-07 12:59:26 UTC (rev 43) +++ trunk/pom.xml 2011-01-07 12:59:52 UTC (rev 44) @@ -141,8 +141,6 @@ nuiton-web - 1.5.3 - 5.2.4 1.6.1 --===============1319085516267427426==-- From bleny@users.nuiton.org Sun Jan 9 20:28:52 2011 From: bleny@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r45 - trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components Date: Sun, 09 Jan 2011 20:28:52 +0100 Message-ID: <20110109192852.251A515BF3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1739495705856872402==" --===============1739495705856872402== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: bleny Date: 2011-01-09 20:28:52 +0100 (Sun, 09 Jan 2011) New Revision: 45 Url: http://nuiton.org/repositories/revision/nuiton-web/45 Log: deprecate submitContext component (doesn't work with Tapestry 5.2) Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/Su= bmitContext.java Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/compon= ents/SubmitContext.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/S= ubmitContext.java 2011-01-07 12:59:52 UTC (rev 44) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/S= ubmitContext.java 2011-01-09 19:28:52 UTC (rev 45) @@ -43,9 +43,15 @@ * String context. The major difference between this component and Tapestry's * Submit component is that this component's context is immutable and can, f= or * example, be set to different values within a loop. + * + * @link http://wiki.apache.org/tapestry/Tapestry5SubmitContextComponent + * @deprecated was a monkey-patch for a Tapestry 5.0.4 issue. In Tapestry + * 5.2, the bug remains not solved but this workaround is broken. + * (your are f*cked). */ @SupportsInformalParameters @Events(EventConstants.SELECTED + " by default, may be overridden") +@Deprecated public final class SubmitContext implements ClientElement { =20 /** --===============1739495705856872402==-- From tchemit@users.nuiton.org Wed Jan 26 16:14:38 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r46 - in trunk: nuiton-rss nuiton-rss/src/license nuiton-rss/src/main/java/org/nuiton/rss nuiton-rss/src/main/resources nuiton-rss/src/main/resources/fckeditor nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/lang nuiton-rss/src/main/webapp nuiton-rss/src/main/webapp/WEB-INF nuiton-rss/src/site nuiton-rss/src/site/apt nuiton-rss/src/test/java/org/nuiton/rss nuiton-rss/src/test/java/resources nuiton-tapest Date: Wed, 26 Jan 2011 16:14:38 +0100 Message-ID: <20110126151438.DA92A16921@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0372898795104135902==" --===============0372898795104135902== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: tchemit Date: 2011-01-26 16:14:38 +0100 (Wed, 26 Jan 2011) New Revision: 46 Url: http://nuiton.org/repositories/revision/nuiton-web/46 Log: optimize dependencies + add svn-keywords Added: trunk/nuiton-tapestry/src/license/ trunk/nuiton-tapestry/src/license/THIRD-PARTY.properties Modified: trunk/nuiton-rss/LICENSE.txt trunk/nuiton-rss/README.txt trunk/nuiton-rss/changelog.txt trunk/nuiton-rss/pom.xml trunk/nuiton-rss/src/license/THIRD-PARTY.properties trunk/nuiton-rss/src/main/java/org/nuiton/rss/BaseServlet.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/ConfigInitializer.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedData.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedEntryComparator.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedHTMLRenderer.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRenderer.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedRendererConfig.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedType.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/FeedURLResolver.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/Field.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLCleaner.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/HTMLScriptCleaner.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSConfig.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGenerator.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorConfig.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSGeneratorServlet.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSHelper.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSIOUtil.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/RSSServlet.java trunk/nuiton-rss/src/main/java/org/nuiton/rss/SimpleFeedURLResolver.java trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/RE= ADME.txt trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/bu= tton.rss.gif trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/fc= k_rssinclude.html trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/fc= k_rssinclude.js trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/fc= kplugin.js trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/la= ng/en.js trunk/nuiton-rss/src/main/resources/fckeditor/editor/plugins/rssinclude/la= ng/fr.js trunk/nuiton-rss/src/main/resources/fckeditor/myfckconfig.js trunk/nuiton-rss/src/main/resources/log4j.properties trunk/nuiton-rss/src/main/webapp/WEB-INF/web.xml trunk/nuiton-rss/src/main/webapp/feed.css trunk/nuiton-rss/src/main/webapp/feeds.txt trunk/nuiton-rss/src/main/webapp/index.html trunk/nuiton-rss/src/main/webapp/rssgenerator.js trunk/nuiton-rss/src/main/webapp/rssinclude.js trunk/nuiton-rss/src/main/webapp/testFck.html trunk/nuiton-rss/src/main/webapp/testGenerator.html trunk/nuiton-rss/src/main/webapp/testRender.html trunk/nuiton-rss/src/site/apt/index.apt trunk/nuiton-rss/src/site/site_fr.xml trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSGeneratorHelperTest.java trunk/nuiton-rss/src/test/java/org/nuiton/rss/RSSTest.java trunk/nuiton-rss/src/test/java/resources/log4j.properties trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/mixins/c= onfirm.js trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/mixins/z= oneUpdater.js Property changes on: trunk/nuiton-rss/LICENSE.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Property changes on: trunk/nuiton-rss/README.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Property changes on: trunk/nuiton-rss/changelog.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/nuiton-rss/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/pom.xml 2011-01-09 19:28:52 UTC (rev 45) +++ trunk/nuiton-rss/pom.xml 2011-01-26 15:14:38 UTC (rev 46) @@ -2,8 +2,8 @@ + + + + + org.nuiton.web + nuiton-web-parent + 1.0-SNAPSHOT + + + nuiton-web + + + + + + + org.jvnet.hudson.winstone + winstone + provided + + + + org.eclipse.jetty.aggregate + jetty-webapp + provided + + + + + + + + + + Nuiton Web :: Nuiton Web + Usefull classes for web developpement. + 2011 + + + + + + jar + + + + + ${redmine.libReleaseFiles} + + + + + + + + + + + + + + + + assembly-profile + + + performRelease + true + + + + package + + + + + maven-assembly-plugin + + + create-assemblies + package + + single + + + + + false + + deps + full + + + + + + + + + + + + Property changes on: trunk/nuiton-web/pom.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-web/src/license/THIRD-PARTY.properties =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/src/license/THIRD-PARTY.properties = (rev 0) +++ trunk/nuiton-web/src/license/THIRD-PARTY.properties 2011-01-26 16:07:53 U= TC (rev 48) @@ -0,0 +1,16 @@ +# Generated by org.nuiton.license.plugin.AddThirdPartyMojo +#---------------------------------------------------------------------------= ---- +# Already used licenses in project : +# - Apache Software License - Version 2.0 +# - BSD License +# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 +# - Eclipse Public License - Version 1.0 +# - GNU Lesser General Public License version 2.1 +# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0 +# - The Apache Software License, Version 2.0 +#---------------------------------------------------------------------------= ---- +# Please fill the missing licenses for dependencies : +# +# +#Wed Jan 26 16:55:58 CET 2011 +javax.servlet--servlet-api--2.5--jar=3DSun Microsystems, Inc. Binary Code Li= cense Agreement for the JDK 5.0 Property changes on: trunk/nuiton-web/src/license/THIRD-PARTY.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java = (rev 0) +++ trunk/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java 2011= -01-26 16:07:53 UTC (rev 48) @@ -0,0 +1,297 @@ +/* + * #%L + * Nuiton Web :: Nuiton Web + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ + +package org.nuiton.web.war; + +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.DefaultHandler; +import org.eclipse.jetty.server.handler.HandlerCollection; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.webapp.WebAppContext; + +import javax.swing.ImageIcon; +import java.awt.AWTException; +import java.awt.Desktop; +import java.awt.Image; +import java.awt.MenuItem; +import java.awt.PopupMenu; +import java.awt.SystemTray; +import java.awt.TrayIcon; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringWriter; +import java.net.JarURLConnection; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; + +/** + * War main class launcher (jetty based). + *=20 + * To use it : + * java -jar app-xxx.war + *=20 + * @author chatellier + * @version $Id$ + * @since 1.0 + */ +public class JettyLauncher implements ActionListener, MouseListener { + + /** Jetty server instance. */ + protected Server jettyServer; + + /** Server URI. */ + protected URI serverUri; + + /** Default port. */ + protected int port =3D 8888; + + /** Server name. */ + protected String serverName; + =20 + /** + * Main method (used by war in manifest). + *=20 + * @param args args + * @throws Exception + */ + public static void main(String[] args) throws Exception { + JettyLauncher launcher =3D new JettyLauncher(); + launcher.readInformation(); + launcher.startServer(args); + launcher.installSystemTray(); + launcher.openBrowser(); + } + + /** + * Parse WEB-INF/web.xml file and get server display name. + *=20 + * @since 1.1.3 + */ + protected void readInformation() { + InputStream stream =3D JettyLauncher.class.getResourceAsStream("/WEB= -INF/web.xml"); + + if (stream !=3D null) { + String content =3D readAsString(stream); + if (content !=3D null) { + int first =3D content.indexOf(""); + if (first >=3D 0) { + serverName =3D content.substring(first + 14, content.ind= exOf("")); + System.out.println("Using server name : " + serverName); + } + } + } + + // if none read, set default + if (serverName =3D=3D null || serverName.isEmpty()) { + serverName =3D "Server"; + } + } + + /** + * Read input stream as string. + *=20 + * Code from commons io. + *=20 + * @param stream stream to read + * @return content as string + * @since 1.1.3 + */ + protected String readAsString(InputStream stream) { + InputStreamReader reader =3D new InputStreamReader(stream); + StringWriter sw =3D new StringWriter(); + char[] buffer =3D new char[4096]; + int n =3D 0; + try { + while (-1 !=3D (n =3D reader.read(buffer))) { + sw.write(buffer, 0, n); + } + } catch (IOException e) { + e.printStackTrace(); + } + return sw.toString(); + } + + /** + * Launch servlet container. + *=20 + * @param args args + * @throws Exception + */ + protected void startServer(String[] args) throws Exception { + System.out.println("Starting server embedded mode..."); + + String fqnLauncherFile =3D JettyLauncher.class.getName().replaceAll(= "\\.", "/") + ".class"; + System.out.println("Search for launcher class : " + fqnLauncherFile); + + URL classFile =3D JettyLauncher.class.getClassLoader().getResource(f= qnLauncherFile); + System.out.println(" - using classFile : " + classFile); + + // strange following line seams also work for jnlp launch + File me =3D new File(((JarURLConnection) classFile.openConnection())= .getJarFile().getName()); + System.out.println(" - using warfile file : " + me); + + jettyServer =3D new Server(); + + Connector connector =3D new SelectChannelConnector(); + connector.setPort(port); + jettyServer.setConnectors(new Connector[]{connector}); + + WebAppContext webappcontext =3D new WebAppContext(); + webappcontext.setContextPath("/"); + webappcontext.setWar(me.getAbsolutePath()); + + HandlerCollection handlers=3D new HandlerCollection(); + handlers.setHandlers(new Handler[]{webappcontext, new DefaultHandler= ()}); + jettyServer.setHandler(handlers); + + jettyServer.start(); + + // build server uri + try { + serverUri =3D new URI("http://localhost:" + port); + } catch (URISyntaxException e) { + e.printStackTrace(); + } + } + + /** + * Shutdown server. + */ + protected void stopServer() { + if (jettyServer !=3D null) { + try { + jettyServer.stop(); + } catch (Exception e) { + e.printStackTrace(); + } + System.exit(0); + } + } + + /** + * Install system tray to stop server. + */ + protected void installSystemTray() { + if (SystemTray.isSupported()) { + // build menu + PopupMenu menu =3D new PopupMenu(); + MenuItem browserItem =3D new MenuItem("Start browser"); + browserItem.addActionListener(this); + browserItem.setActionCommand("browser"); + menu.add(browserItem); + + MenuItem stopItem =3D new MenuItem("Stop server"); + stopItem.addActionListener(this); + stopItem.setActionCommand("stop"); + menu.add(stopItem); + + // build tray icon + URL imageURL =3D JettyLauncher.class.getResource("/favicon.png"); + if (imageURL =3D=3D null) { + imageURL =3D JettyLauncher.class.getResource("/favicon.jpg"); + } + if (imageURL =3D=3D null) { + System.out.println("No favicon.{png|jpg} found, skip systray= installation"); + } else { + Image image =3D new ImageIcon(imageURL).getImage(); + TrayIcon icon =3D new TrayIcon(image, serverName, menu); + icon.setImageAutoSize(true); + icon.addMouseListener(this); + + // System tray + SystemTray systemTray =3D SystemTray.getSystemTray(); + try { + systemTray.add(icon); + } catch (AWTException ex) { + throw new RuntimeException("Can't install tray icon", ex= ); + } + } + } + } + + @Override + public void actionPerformed(ActionEvent e) { + if ("browser".equalsIgnoreCase(e.getActionCommand())) { + openBrowser(); + } else if ("stop".equalsIgnoreCase(e.getActionCommand())) { + stopServer(); + } + } + + /** + * Open browser. + *=20 + * @throws IOException=20 + */ + protected void openBrowser() { + if (Desktop.isDesktopSupported() && serverUri !=3D null) { + Desktop desktop =3D Desktop.getDesktop(); + if (desktop.isSupported(Desktop.Action.BROWSE)) { + System.out.println("Opening browser at " + serverUri); + try { + desktop.browse(serverUri); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + @Override + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() =3D=3D 2) { + openBrowser(); + } + } + + @Override + public void mousePressed(MouseEvent e) { + + } + + @Override + public void mouseReleased(MouseEvent e) { + + } + + @Override + public void mouseEntered(MouseEvent e) { + + } + + @Override + public void mouseExited(MouseEvent e) { + + } +} Property changes on: trunk/nuiton-web/src/main/java/org/nuiton/web/war/JettyL= auncher.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-web/src/main/java/org/nuiton/web/war/WinstoneLauncher.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/src/main/java/org/nuiton/web/war/WinstoneLauncher.java = (rev 0) +++ trunk/nuiton-web/src/main/java/org/nuiton/web/war/WinstoneLauncher.java 2= 011-01-26 16:07:53 UTC (rev 48) @@ -0,0 +1,294 @@ +/* + * #%L + * Nuiton Web :: Nuiton Web + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +package org.nuiton.web.war; + +import winstone.Launcher; + +import javax.swing.ImageIcon; +import java.awt.AWTException; +import java.awt.Desktop; +import java.awt.Image; +import java.awt.MenuItem; +import java.awt.PopupMenu; +import java.awt.SystemTray; +import java.awt.TrayIcon; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringWriter; +import java.net.JarURLConnection; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.Map; + +/** + * War main class launcher (winstone based). + *=20 + * Based on winstone micro container. + *=20 + * To use it : + * java -jar app-xxx.war + *=20 + * @author chatellier + * @version $Id$ + * @since 1.0 + */ +public class WinstoneLauncher implements ActionListener, MouseListener { + + /** Winstone server instance. */ + protected Launcher winstone; + + /** Server URI. */ + protected URI serverUri; + + /** Server name. */ + protected String serverName; + + /** + * Main method (used by war in manifest). + *=20 + * @param args args + * @throws IOException + */ + public static void main(String[] args) throws IOException { + WinstoneLauncher launcher =3D new WinstoneLauncher(); + launcher.readInformation(); + launcher.startServer(args); + launcher.installSystemTray(); + launcher.openBrowser(); + } + + /** + * Parse WEB-INF/web.xml file and get server display name. + *=20 + * @since 1.1.3 + */ + protected void readInformation() { + InputStream stream =3D WinstoneLauncher.class.getResourceAsStream("/= WEB-INF/web.xml"); + =20 + if (stream !=3D null) { + String content =3D readAsString(stream); + if (content !=3D null) { + int first =3D content.indexOf(""); + if (first >=3D 0) { + serverName =3D content.substring(first + 14, content.ind= exOf("")); + System.out.println("Using server name : " + serverName); + } + } + } + + // if none read, set default + if (serverName =3D=3D null || serverName.isEmpty()) { + serverName =3D "Server"; + } + } + + /** + * Read input stream as string. + *=20 + * Code from commons io. + *=20 + * @param stream stream to read + * @return content as string + * @since 1.1.3 + */ + protected String readAsString(InputStream stream) { + InputStreamReader reader =3D new InputStreamReader(stream); + StringWriter sw =3D new StringWriter(); + char[] buffer =3D new char[4096]; + int n =3D 0; + try { + while (-1 !=3D (n =3D reader.read(buffer))) { + sw.write(buffer, 0, n); + } + } catch (IOException e) { + e.printStackTrace(); + } + return sw.toString(); + } + + /** + * Launch servlet container. + *=20 + * @param args args + * @throws IOException + */ + protected void startServer(String[] args) throws IOException { + System.out.println("Starting server embedded mode..."); + + String fqnLauncherFile =3D WinstoneLauncher.class.getName().replaceA= ll("\\.", "/") + ".class"; + System.out.println("Search for launcher class : " + fqnLauncherFile); + + URL classFile =3D WinstoneLauncher.class.getClassLoader().getResourc= e(fqnLauncherFile); + System.out.println(" - using classFile : " + classFile); + + // strange following line seams also work for jnlp launch + File me =3D new File(((JarURLConnection) classFile.openConnection())= .getJarFile().getName()); + System.out.println(" - using warfile file : " + me); + + // hashArgs map, initialized with command line args + Map hashArgs =3D Launcher.getArgsFromCommandLine(arg= s); + + hashArgs.put("warfile", me.getAbsolutePath()); // or any other comma= nd line args, eg port + + System.out.println(" - using args : " + hashArgs); + + Launcher.initLogger(hashArgs); + winstone =3D new Launcher(hashArgs); // spawns threads, so your appl= ication doesn't block + + // open browser + int port =3D 8080; + String configPort =3D hashArgs.get("httpPort"); + if (configPort !=3D null && !configPort.isEmpty()) { + try { + port =3D Integer.parseInt(configPort); + } catch (NumberFormatException e) { + e.printStackTrace(); + } + } + + // build server uri + try { + serverUri =3D new URI("http://localhost:" + port); + } catch (URISyntaxException e) { + e.printStackTrace(); + } + } + + /** + * Shutdown server. + */ + protected void stopServer() { + if (winstone !=3D null) { + winstone.shutdown(); + System.exit(0); + } + } + + /** + * Install system tray to stop server. + */ + protected void installSystemTray() { + if (SystemTray.isSupported()) { + // build menu + PopupMenu menu =3D new PopupMenu(); + MenuItem browserItem =3D new MenuItem("Start browser"); + browserItem.addActionListener(this); + browserItem.setActionCommand("browser"); + menu.add(browserItem); + + MenuItem stopItem =3D new MenuItem("Stop server"); + stopItem.addActionListener(this); + stopItem.setActionCommand("stop"); + menu.add(stopItem); + + // build tray icon + URL imageURL =3D WinstoneLauncher.class.getResource("/favicon.pn= g"); + if (imageURL =3D=3D null) { + imageURL =3D WinstoneLauncher.class.getResource("/favicon.jp= g"); + } + if (imageURL =3D=3D null) { + System.out.println("No favicon.{png|jpg} found, skip systray= installation"); + } else { + Image image =3D new ImageIcon(imageURL).getImage(); + TrayIcon icon =3D new TrayIcon(image, serverName, menu); + icon.setImageAutoSize(true); + icon.addMouseListener(this); + + // System tray + SystemTray systemTray =3D SystemTray.getSystemTray(); + try { + systemTray.add(icon); + } catch (AWTException ex) { + throw new RuntimeException("Can't install tray icon", ex= ); + } + } + } + } + + /* + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.Act= ionEvent) + */ + @Override + public void actionPerformed(ActionEvent e) { + if ("browser".equalsIgnoreCase(e.getActionCommand())) { + openBrowser(); + } else if ("stop".equalsIgnoreCase(e.getActionCommand())) { + stopServer(); + } + } + + /** + * Open browser. + *=20 + * @throws IOException=20 + */ + protected void openBrowser() { + if (Desktop.isDesktopSupported() && serverUri !=3D null) { + Desktop desktop =3D Desktop.getDesktop(); + if (desktop.isSupported(Desktop.Action.BROWSE)) { + System.out.println("Opening browser at " + serverUri); + try { + desktop.browse(serverUri); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + + @Override + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() =3D=3D 2) { + openBrowser(); + } + } + + @Override + public void mousePressed(MouseEvent e) { + + } + + @Override + public void mouseReleased(MouseEvent e) { + + } + + @Override + public void mouseEntered(MouseEvent e) { + + } + + @Override + public void mouseExited(MouseEvent e) { + + } +} Property changes on: trunk/nuiton-web/src/main/java/org/nuiton/web/war/Winsto= neLauncher.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-web/src/main/java/org/nuiton/web/war/package-info.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/src/main/java/org/nuiton/web/war/package-info.java = (rev 0) +++ trunk/nuiton-web/src/main/java/org/nuiton/web/war/package-info.java 2011-= 01-26 16:07:53 UTC (rev 48) @@ -0,0 +1,34 @@ +/* + * #%L + * Nuiton Web :: Nuiton Web + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ +/** + * Embedded war launchers. + *=20 + * Currently implemented with : + *
      + *
    • Winstone : {@link org.nuiton.web.war.WinstoneLauncher}
    • + *
    • Jetty : {@link org.nuiton.web.war.JettyLauncher}
    • + *
    + */ +package org.nuiton.web.war; Property changes on: trunk/nuiton-web/src/main/java/org/nuiton/web/war/packag= e-info.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-web/src/site/apt/Warlauncher.apt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/src/site/apt/Warlauncher.apt (re= v 0) +++ trunk/nuiton-web/src/site/apt/Warlauncher.apt 2011-01-26 16:07:53 UTC (re= v 48) @@ -0,0 +1,174 @@ +~~~ +~~ #%L +~~ Nuiton Web :: Nuiton Web +~~=20 +~~ $Id$ +~~ $HeadURL$ +~~ %% +~~ Copyright (C) 2011 CodeLutin +~~ %% +~~ This program is free software: you can redistribute it and/or modify +~~ it under the terms of the GNU Lesser General Public License as=20 +~~ published by the Free Software Foundation, either version 3 of the=20 +~~ License, or (at your option) any later version. +~~=20 +~~ This program is distributed in the hope that it will be useful, +~~ but WITHOUT ANY WARRANTY; without even the implied warranty of +~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +~~ GNU General Lesser Public License for more details. +~~=20 +~~ You should have received a copy of the GNU General Lesser Public=20 +~~ License along with this program. If not, see +~~ . +~~ #L% +~~~ + ------ + War launcher + ------ + =20 + +War launcher + +* Features + + * Start embedded servlet container with current webapp + + * Favicon support + + * Systray with popup menu + +* Prerequisites + + By default, both jetty and winstone look for an icon named <>= or + <> at webapp base. If none of this icons is found, system tray + won't work. + =20 + In maven, by default, this file must be put in <<>> direc= tory. + =20 + If <<>> content can be read into <<>> file, + it's used as server name (currently in systray tooltip). + +* Use Winstone war launcher + +** Maven configuration + + Add following dependencies to your project. + +------------------------------------------------ + + org.nuiton + nuiton-utils + 1.3 + provided + + + org.jvnet.hudson.winstone + winstone + 0.9.10-hudson-16 + provided + +------------------------------------------------ + + They have to be both at least in <<>> scope. + + Then, you need to add following configuration into maven-war-plugin : + +-------------------------------------------------------------------- + + maven-war-plugin + 2.1-beta-1 + + + + org.nuiton.util.war.WinstoneLauncher + + + + + org.nuiton + nuiton-utils + jar + + **/war/Winstone* + + =20 + + org.jvnet.hudson.winstone + winstone + jar + + + + +-------------------------------------------------------------------- + +** References + + * Winstone home : {{http://winstone.sourceforge.net}} + + * Winstone command line options : {{http://winstone.sourceforge.net/#comma= ndLine}} + +* Jetty based + +** Maven configuration + + Add following dependencies to your project. + +------------------------------------------------ + + org.nuiton + nuiton-utils + 1.3 + provided + + + org.eclipse.jetty.aggregate + jetty-webapp + 7.1.0.v20100505 + provided + + + javax.servlet + servlet-api + 2.5 + provided + +------------------------------------------------ + + They have to be both at least in <<>> scope. + + Then, you need to add following configuration into maven-war-plugin : + +-------------------------------------------------------------------- + + maven-war-plugin + 2.1-beta-1 + + + + org.nuiton.util.war.JettyLauncher + + + + + org.nuiton + nuiton-utils + jar + + **/war/Jetty* + + =20 + + org.eclipse.jetty.aggregate + jetty-webapp + jar + + + javax.servlet + servlet-api + jar + + + + +-------------------------------------------------------------------- Property changes on: trunk/nuiton-web/src/site/apt/Warlauncher.apt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-web/src/site/apt/index.apt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/src/site/apt/index.apt (rev 0) +++ trunk/nuiton-web/src/site/apt/index.apt 2011-01-26 16:07:53 UTC (rev 48) @@ -0,0 +1,34 @@ +~~~ +~~ #%L +~~ Nuiton Web :: Nuiton Web +~~=20 +~~ $Id$ +~~ $HeadURL$ +~~ %% +~~ Copyright (C) 2011 CodeLutin +~~ %% +~~ This program is free software: you can redistribute it and/or modify +~~ it under the terms of the GNU Lesser General Public License as=20 +~~ published by the Free Software Foundation, either version 3 of the=20 +~~ License, or (at your option) any later version. +~~=20 +~~ This program is distributed in the hope that it will be useful, +~~ but WITHOUT ANY WARRANTY; without even the implied warranty of +~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +~~ GNU General Lesser Public License for more details. +~~=20 +~~ You should have received a copy of the GNU General Lesser Public=20 +~~ License along with this program. If not, see +~~ . +~~ #L% +~~~ + ---- + Nuiton Web + ---- + ---- + 2009-08-23 + ---- + =20 +Pr=C3=A9sentation + + A faire... Property changes on: trunk/nuiton-web/src/site/apt/index.apt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/nuiton-web/src/site/site_fr.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/src/site/site_fr.xml (rev 0) +++ trunk/nuiton-web/src/site/site_fr.xml 2011-01-26 16:07:53 UTC (rev 48) @@ -0,0 +1,62 @@ + + + + + + + ${project.name} + index.html + + + + + + + + +
    + + + + + + + + + + + + + + + + Property changes on: trunk/nuiton-web/src/site/site_fr.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2011-01-26 15:30:14 UTC (rev 47) +++ trunk/pom.xml 2011-01-26 16:07:53 UTC (rev 48) @@ -20,6 +20,7 @@ 1.0-SNAPSHOT =20 + nuiton-web nuiton-tapestry nuiton-rss @@ -28,6 +29,20 @@ =20 =20 + + + + org.jvnet.hudson.winstone + winstone + 0.9.10-hudson-24 + + + + org.eclipse.jetty.aggregate + jetty-webapp + 7.1.0.v20100505 + + =20 org.apache.tapestry --===============7721424352851074255==-- From tchemit@users.nuiton.org Wed Jan 26 17:08:25 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r49 - in trunk/nuiton-tapestry/src/main: java/org/nuiton/web/tapestry5/annotations java/org/nuiton/web/tapestry5/components java/org/nuiton/web/tapestry5/data java/org/nuiton/web/tapestry5/mixins java/org/nuiton/web/tapestry5/services resources/org/nuiton/web/tapestry5/components Date: Wed, 26 Jan 2011 17:08:25 +0100 Message-ID: <20110126160825.77D5C1691C@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0510320573791580076==" --===============0510320573791580076== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: tchemit Date: 2011-01-26 17:08:25 +0100 (Wed, 26 Jan 2011) New Revision: 49 Url: http://nuiton.org/repositories/revision/nuiton-web/49 Log: finish work of others... Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/R= equiresAuthentication.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/Fe= edBack.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstract= MappedGridDataSource.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confir= m.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneUp= dater.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abst= ractAuthenticationFilter.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Form= atBinding.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Form= atBindingFactory.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nuit= onModule.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Serv= iceAuthentication.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Serv= iceAuthenticationImpl.java trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/pack= age-info.java trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/componen= ts/feedback.css Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annota= tions/RequiresAuthentication.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/= RequiresAuthentication.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/annotations/= RequiresAuthentication.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.annotations; =20 import java.lang.annotation.Documented; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/compon= ents/FeedBack.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/F= eedBack.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/components/F= eedBack.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ /* *##% * Pollen :: Pollen Web Interface * Copyright (C) 2009 - 2010 Code Lutin Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/A= bstractMappedGridDataSource.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstrac= tMappedGridDataSource.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/data/Abstrac= tMappedGridDataSource.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.data; =20 import org.apache.commons.collections.CollectionUtils; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins= /Confirm.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confi= rm.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/Confi= rm.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.mixins; =20 import org.apache.tapestry5.BindingConstants; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins= /ZoneUpdater.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneU= pdater.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneU= pdater.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ /** * *##%=20 * Wao :: Web Interface Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/AbstractAuthenticationFilter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abs= tractAuthenticationFilter.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Abs= tractAuthenticationFilter.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.services; =20 import org.apache.tapestry5.Link; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBinding.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBinding.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBinding.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.services; =20 import org.apache.tapestry5.Binding; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/FormatBindingFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBindingFactory.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/For= matBindingFactory.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.services; =20 import org.apache.tapestry5.Binding; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/NuitonModule.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nui= tonModule.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Nui= tonModule.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.services; =20 import org.apache.tapestry5.ioc.Configuration; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthentication.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthentication.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthentication.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.services; =20 /** Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/ServiceAuthenticationImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthenticationImpl.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/Ser= viceAuthenticationImpl.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ package org.nuiton.web.tapestry5.services; =20 import org.apache.tapestry5.ioc.internal.util.TapestryException; Modified: trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/servic= es/package-info.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/pac= kage-info.java 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/services/pac= kage-info.java 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ /** * This package contains extra services (or abstraction) for Tapestry * applications. Generally, these services need to be built in the Modified: trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/c= omponents/feedback.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/compone= nts/feedback.css 2011-01-26 16:07:53 UTC (rev 48) +++ trunk/nuiton-tapestry/src/main/resources/org/nuiton/web/tapestry5/compone= nts/feedback.css 2011-01-26 16:08:25 UTC (rev 49) @@ -1,3 +1,27 @@ +/* + * #%L + * Nuiton Web :: Nuiton Tapestry + *=20 + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 - 2011 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ =20 .fb-error { width: 400px; --===============0510320573791580076==-- From tchemit@users.nuiton.org Wed Jan 26 17:16:00 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r50 - trunk Date: Wed, 26 Jan 2011 17:16:00 +0100 Message-ID: <20110126161600.2487216921@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6811832736614572544==" --===============6811832736614572544== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2011-01-26 17:16:00 +0100 (Wed, 26 Jan 2011) New Revision: 50 Url: http://nuiton.org/repositories/revision/nuiton-web/50 Log: This is a central-able project ;) Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-26 16:08:25 UTC (rev 49) +++ trunk/pom.xml 2011-01-26 16:16:00 UTC (rev 50) @@ -11,7 +11,7 @@ org.nuiton - mavenpom4redmine + mavenpom4redmineAndCentral 2.4.2 --===============6811832736614572544==-- From hudson@users.nuiton.org Wed Jan 26 17:19:21 2011 From: hudson@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r51 - in trunk: . nuiton-rss nuiton-tapestry nuiton-web Date: Wed, 26 Jan 2011 17:19:21 +0100 Message-ID: <20110126161921.092921691C@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4369048802828839953==" --===============4369048802828839953== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: hudson Date: 2011-01-26 17:19:20 +0100 (Wed, 26 Jan 2011) New Revision: 51 Url: http://nuiton.org/repositories/revision/nuiton-web/51 Log: [maven-release-plugin] prepare release nuiton-web-1.0 Modified: trunk/nuiton-rss/pom.xml trunk/nuiton-tapestry/pom.xml trunk/nuiton-web/pom.xml trunk/pom.xml Modified: trunk/nuiton-rss/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/pom.xml 2011-01-26 16:16:00 UTC (rev 50) +++ trunk/nuiton-rss/pom.xml 2011-01-26 16:19:20 UTC (rev 51) @@ -22,9 +22,7 @@ . #L% --> - + =20 4.0.0 =20 @@ -35,7 +33,7 @@ org.nuiton.web nuiton-web-parent - 1.0-SNAPSHOT + 1.0 =20 nuiton-rss Modified: trunk/nuiton-tapestry/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/pom.xml 2011-01-26 16:16:00 UTC (rev 50) +++ trunk/nuiton-tapestry/pom.xml 2011-01-26 16:19:20 UTC (rev 51) @@ -1,7 +1,5 @@ - + =20 4.0.0 =20 @@ -12,7 +10,7 @@ org.nuiton.web nuiton-web-parent - 1.0-SNAPSHOT + 1.0 =20 nuiton-tapestry Modified: trunk/nuiton-web/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/pom.xml 2011-01-26 16:16:00 UTC (rev 50) +++ trunk/nuiton-web/pom.xml 2011-01-26 16:19:20 UTC (rev 51) @@ -1,8 +1,6 @@ =20 - + =20 4.0.0 =20 @@ -13,7 +11,7 @@ org.nuiton.web nuiton-web-parent - 1.0-SNAPSHOT + 1.0 =20 nuiton-web Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2011-01-26 16:16:00 UTC (rev 50) +++ trunk/pom.xml 2011-01-26 16:19:20 UTC (rev 51) @@ -1,7 +1,5 @@ - + =20 4.0.0 =20 @@ -17,7 +15,7 @@ =20 org.nuiton.web nuiton-web-parent - 1.0-SNAPSHOT + 1.0 =20 nuiton-web @@ -204,11 +202,11 @@ =20 - scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk + scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web= -1.0 - scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk + scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-1.0 - http://www.nuiton.org/repositories/browse/nuiton-web/trunk + http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we= b-1.0 =20 --===============4369048802828839953==-- From hudson@users.nuiton.org Wed Jan 26 17:19:22 2011 From: hudson@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r52 - tags Date: Wed, 26 Jan 2011 17:19:22 +0100 Message-ID: <20110126161922.8FAAF16921@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1797204582095752868==" --===============1797204582095752868== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: hudson Date: 2011-01-26 17:19:22 +0100 (Wed, 26 Jan 2011) New Revision: 52 Url: http://nuiton.org/repositories/revision/nuiton-web/52 Log: [maven-release-plugin] copy for tag nuiton-web-1.0 Added: tags/nuiton-web-1.0/ --===============1797204582095752868==-- From hudson@users.nuiton.org Wed Jan 26 17:19:23 2011 From: hudson@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r53 - in trunk: . nuiton-rss nuiton-tapestry nuiton-web Date: Wed, 26 Jan 2011 17:19:23 +0100 Message-ID: <20110126161923.620AB1691C@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0480205672195472415==" --===============0480205672195472415== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: hudson Date: 2011-01-26 17:19:23 +0100 (Wed, 26 Jan 2011) New Revision: 53 Url: http://nuiton.org/repositories/revision/nuiton-web/53 Log: [maven-release-plugin] prepare for next development iteration Modified: trunk/nuiton-rss/pom.xml trunk/nuiton-tapestry/pom.xml trunk/nuiton-web/pom.xml trunk/pom.xml Modified: trunk/nuiton-rss/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-rss/pom.xml 2011-01-26 16:19:22 UTC (rev 52) +++ trunk/nuiton-rss/pom.xml 2011-01-26 16:19:23 UTC (rev 53) @@ -33,7 +33,7 @@ org.nuiton.web nuiton-web-parent - 1.0 + 1.1-SNAPSHOT =20 nuiton-rss Modified: trunk/nuiton-tapestry/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-tapestry/pom.xml 2011-01-26 16:19:22 UTC (rev 52) +++ trunk/nuiton-tapestry/pom.xml 2011-01-26 16:19:23 UTC (rev 53) @@ -10,7 +10,7 @@ org.nuiton.web nuiton-web-parent - 1.0 + 1.1-SNAPSHOT =20 nuiton-tapestry Modified: trunk/nuiton-web/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-web/pom.xml 2011-01-26 16:19:22 UTC (rev 52) +++ trunk/nuiton-web/pom.xml 2011-01-26 16:19:23 UTC (rev 53) @@ -11,7 +11,7 @@ org.nuiton.web nuiton-web-parent - 1.0 + 1.1-SNAPSHOT =20 nuiton-web Modified: trunk/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/pom.xml 2011-01-26 16:19:22 UTC (rev 52) +++ trunk/pom.xml 2011-01-26 16:19:23 UTC (rev 53) @@ -15,7 +15,7 @@ =20 org.nuiton.web nuiton-web-parent - 1.0 + 1.1-SNAPSHOT =20 nuiton-web @@ -202,11 +202,11 @@ =20 - scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web= -1.0 + scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk - scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-1.0 + scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk - http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we= b-1.0 + http://www.nuiton.org/repositories/browse/nuiton-web/trunk =20 --===============0480205672195472415==-- From tchemit@users.nuiton.org Wed Jan 26 19:56:28 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r54 - trunk Date: Wed, 26 Jan 2011 19:56:28 +0100 Message-ID: <20110126185628.346A615CC2@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2942425376459538966==" --===============2942425376459538966== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2011-01-26 19:56:28 +0100 (Wed, 26 Jan 2011) New Revision: 54 Url: http://nuiton.org/repositories/revision/nuiton-web/54 Log: Anomalie #1255: Fix site deployement Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-26 16:19:23 UTC (rev 53) +++ trunk/pom.xml 2011-01-26 18:56:28 UTC (rev 54) @@ -166,6 +166,13 @@ + + + ${site.server} + ${our.site.repository}/${projectId} + + + --===============2942425376459538966==-- From tchemit@users.nuiton.org Thu Jan 27 09:55:27 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r55 - trunk Date: Thu, 27 Jan 2011 09:55:27 +0100 Message-ID: <20110127085527.7613115CBD@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1157040837958624931==" --===============1157040837958624931== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2011-01-27 09:55:27 +0100 (Thu, 27 Jan 2011) New Revision: 55 Url: http://nuiton.org/repositories/revision/nuiton-web/55 Log: Updates mavenpom to 2.4.3 Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-26 18:56:28 UTC (rev 54) +++ trunk/pom.xml 2011-01-27 08:55:27 UTC (rev 55) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmineAndCentral - 2.4.2 + 2.4.3 org.nuiton.web --===============1157040837958624931==-- From tchemit@users.nuiton.org Thu Jan 27 12:06:30 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r56 - in trunk/src/site: . apt Date: Thu, 27 Jan 2011 12:06:30 +0100 Message-ID: <20110127110630.73ECB15BF3@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0094080468931116303==" --===============0094080468931116303== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: tchemit Date: 2011-01-27 12:06:30 +0100 (Thu, 27 Jan 2011) New Revision: 56 Url: http://nuiton.org/repositories/revision/nuiton-web/56 Log: Anomalie #1262: Fix site breadcrumbs url Anomalie #1263: No site_fr.xml on parent Added: trunk/src/site/apt/ trunk/src/site/apt/index.apt trunk/src/site/site_fr.xml Copied: trunk/src/site/apt/index.apt (from rev 55, trunk/nuiton-web/src/site/= apt/index.apt) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/site/apt/index.apt (rev 0) +++ trunk/src/site/apt/index.apt 2011-01-27 11:06:30 UTC (rev 56) @@ -0,0 +1,34 @@ +~~~ +~~ #%L +~~ Nuiton Web :: Nuiton Web +~~=20 +~~ $Id$ +~~ $HeadURL$ +~~ %% +~~ Copyright (C) 2011 CodeLutin +~~ %% +~~ This program is free software: you can redistribute it and/or modify +~~ it under the terms of the GNU Lesser General Public License as=20 +~~ published by the Free Software Foundation, either version 3 of the=20 +~~ License, or (at your option) any later version. +~~=20 +~~ This program is distributed in the hope that it will be useful, +~~ but WITHOUT ANY WARRANTY; without even the implied warranty of +~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +~~ GNU General Lesser Public License for more details. +~~=20 +~~ You should have received a copy of the GNU General Lesser Public=20 +~~ License along with this program. If not, see +~~ . +~~ #L% +~~~ + ---- + Nuiton Web + ---- + ---- + 2011-01-27 + ---- + =20 +Pr=C3=A9sentation + + A faire... Property changes on: trunk/src/site/apt/index.apt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/src/site/site_fr.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/src/site/site_fr.xml (rev 0) +++ trunk/src/site/site_fr.xml 2011-01-27 11:06:30 UTC (rev 56) @@ -0,0 +1,55 @@ + + + + + + + + ${project.name} + index.html + + + + + + + + + + + + + + + + + + =20 + + + + Property changes on: trunk/src/site/site_fr.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native --===============0094080468931116303==-- From tchemit@users.nuiton.org Wed Feb 9 09:21:24 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r57 - trunk Date: Wed, 09 Feb 2011 09:21:23 +0100 Message-ID: <20110209082123.EAB4D15A19@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1406904152090993418==" --===============1406904152090993418== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2011-02-09 09:21:23 +0100 (Wed, 09 Feb 2011) New Revision: 57 Url: http://nuiton.org/repositories/revision/nuiton-web/57 Log: Update mavenpom4redmineAndCentral to 2.4.4. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-01-27 11:06:30 UTC (rev 56) +++ trunk/pom.xml 2011-02-09 08:21:23 UTC (rev 57) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmineAndCentral - 2.4.3 + 2.4.4 org.nuiton.web --===============1406904152090993418==-- From tchemit@users.nuiton.org Thu Feb 10 13:15:14 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r58 - trunk Date: Thu, 10 Feb 2011 13:15:14 +0100 Message-ID: <20110210121514.4379115A45@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4961005074666724070==" --===============4961005074666724070== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2011-02-10 13:15:14 +0100 (Thu, 10 Feb 2011) New Revision: 58 Url: http://nuiton.org/repositories/revision/nuiton-web/58 Log: Update mavenpom4redmineAndCentral to 2.5. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-02-09 08:21:23 UTC (rev 57) +++ trunk/pom.xml 2011-02-10 12:15:14 UTC (rev 58) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmineAndCentral - 2.4.4 + 2.5 org.nuiton.web --===============4961005074666724070==-- From tchemit@users.nuiton.org Wed Feb 16 22:27:55 2011 From: tchemit@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r59 - trunk Date: Wed, 16 Feb 2011 22:27:55 +0100 Message-ID: <20110216212755.7355116949@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1554467754297838535==" --===============1554467754297838535== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Author: tchemit Date: 2011-02-16 22:27:55 +0100 (Wed, 16 Feb 2011) New Revision: 59 Url: http://nuiton.org/repositories/revision/nuiton-web/59 Log: Update mavenpom4redmineAndCentral to 2.5.1. Modified: trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2011-02-10 12:15:14 UTC (rev 58) +++ trunk/pom.xml 2011-02-16 21:27:55 UTC (rev 59) @@ -10,7 +10,7 @@ org.nuiton mavenpom4redmineAndCentral - 2.5 + 2.5.1 org.nuiton.web --===============1554467754297838535==-- From jcouteau@users.nuiton.org Wed Mar 9 12:01:11 2011 From: jcouteau@users.nuiton.org To: nuiton-web-commits@list.nuiton.org Subject: [Nuiton-web-commits] r60 - in trunk: . nuiton-gwt nuiton-gwt/src nuiton-gwt/src/main nuiton-gwt/src/main/java nuiton-gwt/src/main/java/org nuiton-gwt/src/main/java/org/nuiton nuiton-gwt/src/main/java/org/nuiton/web nuiton-gwt/src/main/java/org/nuiton/web/gwt nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable nuiton-gwt/src/main/java/org/nuiton/web/gwt/messages nuiton-gwt/src/main/java/org/nuiton/web/gwt/misc nuiton-gwt/src/main/java/org/nuiton/web/gwt/table nuiton-gwt/src/main/resources nuiton-gwt/src/m Date: Wed, 09 Mar 2011 12:01:10 +0100 Message-ID: <20110309110110.D263416C1F@nuiton.codelutin.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0444606219492938517==" --===============0444606219492938517== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: jcouteau Date: 2011-03-09 12:01:10 +0100 (Wed, 09 Mar 2011) New Revision: 60 Url: http://nuiton.org/repositories/revision/nuiton-web/60 Log: Evolution #1384: Add a gwt module Added: trunk/nuiton-gwt/ trunk/nuiton-gwt/LICENSE.txt trunk/nuiton-gwt/README.txt trunk/nuiton-gwt/changelog.txt trunk/nuiton-gwt/pom.xml trunk/nuiton-gwt/src/ trunk/nuiton-gwt/src/main/ trunk/nuiton-gwt/src/main/java/ trunk/nuiton-gwt/src/main/java/org/ trunk/nuiton-gwt/src/main/java/org/nuiton/ trunk/nuiton-gwt/src/main/java/org/nuiton/web/ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/NuitonGWT.gwt.xml trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ComparableAnc= hor.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ComparableBut= ton.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ComparableLis= tBox.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/messages/ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/messages/UIMessages.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/misc/ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/misc/BlindedPopup.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/misc/LoaderNotification.= java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/AbstractGWTTableMo= del.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/DefaultTableModel.= java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/FlexTableWithModel= .java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/GWTTableModel.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableFlexTableW= ithModel.java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableTableModel= .java trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/TableModelEvent.ja= va trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/TableModelListener= .java trunk/nuiton-gwt/src/main/resources/ trunk/nuiton-gwt/src/main/resources/i18n/ trunk/nuiton-gwt/src/main/resources/i18n/nuiton-gwt_en_GB.properties trunk/nuiton-gwt/src/main/resources/i18n/nuiton-gwt_fr_FR.properties Property changes on: trunk/nuiton-gwt ___________________________________________________________________ Added: svn:ignore + *.iml target Added: trunk/nuiton-gwt/LICENSE.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-gwt/LICENSE.txt (rev 0) +++ trunk/nuiton-gwt/LICENSE.txt 2011-03-09 11:01:10 UTC (rev 60) @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions.=20 + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version.=20 + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + Property changes on: trunk/nuiton-gwt/LICENSE.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/nuiton-gwt/README.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-gwt/README.txt (rev 0) +++ trunk/nuiton-gwt/README.txt 2011-03-09 11:01:10 UTC (rev 60) @@ -0,0 +1 @@ + Property changes on: trunk/nuiton-gwt/README.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/nuiton-gwt/changelog.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-gwt/changelog.txt (rev 0) +++ trunk/nuiton-gwt/changelog.txt 2011-03-09 11:01:10 UTC (rev 60) @@ -0,0 +1,2 @@ +Please refer to the release note : + http://maven-site.nuiton.org/nuiton-gwt/changes-report.html \ No newline at end of file Property changes on: trunk/nuiton-gwt/changelog.txt ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/nuiton-gwt/pom.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-gwt/pom.xml (rev 0) +++ trunk/nuiton-gwt/pom.xml 2011-03-09 11:01:10 UTC (rev 60) @@ -0,0 +1,100 @@ + + + + 4.0.0 + + + + + + + org.nuiton.web + nuiton-web-parent + 1.1-SNAPSHOT + + + nuiton-gwt + + + + + + com.google.gwt + gwt-user + + =20 + + + + + + + + Nuiton Web :: Nuiton GWT + Extra classes for GWT based applications + + + + + + jar + + + + + + + + org.nuiton.i18n + maven-i18n-plugin + + + scan-gwt-java-source + + parserGWTJava + + + + gen + + gen + + + fr_FR,en_GB + + + + + + + + maven-source-plugin + + + attach-sources + + jar + + + + + + + + org.codehaus.mojo + gwt-maven-plugin + + + + resources + + + + + + + + + Property changes on: trunk/nuiton-gwt/pom.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/NuitonGWT.gwt.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/NuitonGWT.gwt.xml = (rev 0) +++ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/NuitonGWT.gwt.xml 2011-= 03-09 11:01:10 UTC (rev 60) @@ -0,0 +1,34 @@ + + + + + + + + + + + + + \ No newline at end of file Property changes on: trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/Nuiton= GWT.gwt.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/Comparabl= eAnchor.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ComparableAn= chor.java (rev 0) +++ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ComparableAn= chor.java 2011-03-09 11:01:10 UTC (rev 60) @@ -0,0 +1,48 @@ +/* + * #%L + * Nuiton Web :: Nuiton GWT + * %% + * Copyright (C) 2010 - 2011 CodeLutin, Jean Couteau + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ + +package org.nuiton.web.gwt.comparable; + +import com.google.gwt.user.client.ui.Anchor; + +/** + * + * Anchor that implements Comparable to be used in SortableTables. Compariso= n is + * made on the text of the anchor. + * + * @author jcouteau + * @since 1.1 + */ +public class ComparableAnchor extends Anchor implements Comparable { + + public ComparableAnchor(String value){ + super(value); + } + + @Override + public int compareTo(Anchor o) { + String oValue =3D o.getText(); + String value =3D getText(); + + return value.compareTo(oValue); + } +} \ No newline at end of file Property changes on: trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/compar= able/ComparableAnchor.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/Comparabl= eButton.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ComparableBu= tton.java (rev 0) +++ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/comparable/ComparableBu= tton.java 2011-03-09 11:01:10 UTC (rev 60) @@ -0,0 +1,44 @@ +/* + * #%L + * Nuiton Web :: Nuiton GWT + * %% + * Copyright (C) 2010 - 2011 CodeLutin, Jean Couteau + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as=20 + * published by the Free Software Foundation, either version 3 of the=20 + * License, or (at your option) any later version. + *=20 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + *=20 + * You should have received a copy of the GNU General Lesser Public=20 + * License along with this program. If not, see + * . + * #L% + */ + +package org.nuiton.web.gwt.comparable; + +import com.google.gwt.user.client.ui.Button; + +/** + * + * Button that implements Comparable to be used in SortableTables. Compariso= n is + * made on Button text. + * + * @author jcouteau + * @since 1.1 + */ +public class ComparableButton extends Button implements Comparable