+ *
+ * @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 extends FeedRenderer> DEFAULT_RENDERER_CLASS =3D F=
eedHTMLRenderer.class;
+ public static Class extends FeedURLResolver> 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 extends FeedRenderer> DEFA=
ULT_RENDERER_CLASS) {
+ RSSConfig.DEFAULT_RENDERER_CLASS =3D DEFAULT_RENDERER_CLASS;
+ }
+
+ public void setDEFAULT_RESOLVER_CLASS(Class extends FeedURLResolver> 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
+ *
excludeMethods (optional) - Customized method names separated by coma=
to
+ * forbid on the proxy of the transaction given to action. By default, if th=
is
+ * parameter is not filled, then we will use this one :
+ * {@link #DEFAULT_EXCLUDE_METHODS}.
+ *
+ *
+ *
*
* @author tchemit
* @since 1.2
@@ -61,6 +101,7 @@
"clear"
};
=20
+ /** names of methods to forbid access while using proxy. */
protected Set excludeMethods;
=20
public Set getExcludeMethods() {
@@ -71,6 +112,12 @@
this.excludeMethods =3D TextParseUtil.commaDelimitedStringToSet(excl=
udeMethods);
}
=20
+ /**
+ * Method to open a new transaction.
+ *
+ * @return the new freshly opened transaction
+ * @throws TopiaException if any problem while opening a new transaction
+ */
protected abstract TopiaContext beginTransaction() throws TopiaException;
=20
@Override
@@ -111,7 +158,7 @@
getClass().getClassLoader(),
new Class>[]{TopiaContext.class,
TopiaContextImplementor.class},
- new TopiaTransactionProxy(transaction)
+ new TopiaTransactionProxyInvocationHandler(transaction)
);
=20
// set the transaction in the action
@@ -138,16 +185,16 @@
}
=20
/**
- * A proxy to used only to forbids usage of some method of the transacti=
on.
+ * Handler of a proxy on a {@link TopiaContext}.
*
* @see TopiaTransactionInterceptor#excludeMethods
*/
- class TopiaTransactionProxy implements InvocationHandler {
+ class TopiaTransactionProxyInvocationHandler implements InvocationHandle=
r {
=20
/** Target to use for the proxy. */
protected final TopiaContext tx;
=20
- TopiaTransactionProxy(TopiaContext tx) {
+ TopiaTransactionProxyInvocationHandler(TopiaContext tx) {
this.tx =3D tx;
}
=20
--===============0274474880355852359==--
From tchemit@users.nuiton.org Tue Jul 5 14:11:36 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r88 -
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2
Date: Tue, 05 Jul 2011 14:11:36 +0200
Message-ID: <20110705121136.DC1B5157EE@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1531545293075372830=="
--===============1531545293075372830==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-07-05 14:11:36 +0200 (Tue, 05 Jul 2011)
New Revision: 88
Url: http://nuiton.org/repositories/revision/nuiton-web/88
Log:
javadoc
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransaction=
Aware.java
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTran=
sactionAware.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-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransactio=
nAware.java 2011-07-05 12:01:58 UTC (rev 87)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransactio=
nAware.java 2011-07-05 12:11:36 UTC (rev 88)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 - 2011 CodeLutin
+ * Copyright (C) 2010 - 2011 CodeLutin, Tony Chemit
* %%
* 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
@@ -31,9 +31,12 @@
* transaction.
*
* The method {@link #getTransaction()} returns the internal transaction use=
d.
+ *
+ * the method {@link #setTransaction(TopiaContext)} put the internal
+ * transaction.
*
* @author tchemit
- * @since 1.1
+ * @since 1.2
*/
public interface TopiaTransactionAware {
=20
@@ -45,6 +48,11 @@
* @return the current transaction (can be null or closed...).
*/
TopiaContext getTransaction();
- =20
+
+ /**
+ * Put in the instance, the given transaction.
+ *
+ * @param transaction the transaction to push
+ */
void setTransaction(TopiaContext transaction);
}
--===============1531545293075372830==--
From hudson@users.nuiton.org Tue Jul 5 15:19:57 2011
From: hudson@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r89 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Tue, 05 Jul 2011 15:19:57 +0200
Message-ID: <20110705131957.4BBEC157EE@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============9068796974057441799=="
--===============9068796974057441799==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: hudson
Date: 2011-07-05 15:19:57 +0200 (Tue, 05 Jul 2011)
New Revision: 89
Url: http://nuiton.org/repositories/revision/nuiton-web/89
Log:
[maven-release-plugin] prepare release nuiton-web-1.2
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-07-05 12:11:36 UTC (rev 88)
+++ trunk/nuiton-gwt/pom.xml 2011-07-05 13:19:57 UTC (rev 89)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.2-SNAPSHOT
+ 1.2
=20
nuiton-gwt
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-07-05 12:11:36 UTC (rev 88)
+++ trunk/nuiton-rss/pom.xml 2011-07-05 13:19:57 UTC (rev 89)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.2-SNAPSHOT
+ 1.2
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-07-05 12:11:36 UTC (rev 88)
+++ trunk/nuiton-struts2/pom.xml 2011-07-05 13:19:57 UTC (rev 89)
@@ -1,7 +1,5 @@
-
+
=20
4.0.0
=20
@@ -12,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.2-SNAPSHOT
+ 1.2
=20
nuiton-struts2
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-07-05 12:11:36 UTC (rev 88)
+++ trunk/nuiton-tapestry/pom.xml 2011-07-05 13:19:57 UTC (rev 89)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.2-SNAPSHOT
+ 1.2
=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-07-05 12:11:36 UTC (rev 88)
+++ trunk/nuiton-web/pom.xml 2011-07-05 13:19:57 UTC (rev 89)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.2-SNAPSHOT
+ 1.2
=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-07-05 12:11:36 UTC (rev 88)
+++ trunk/pom.xml 2011-07-05 13:19:57 UTC (rev 89)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.2-SNAPSHOT
+ 1.2
=20
nuiton-web
@@ -292,11 +292,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.2
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-1.2
- http://www.nuiton.org/repositories/browse/nuiton-web/trunk
+ http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-1.2
=20
--===============9068796974057441799==--
From hudson@users.nuiton.org Tue Jul 5 15:19:59 2011
From: hudson@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r91 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Tue, 05 Jul 2011 15:19:59 +0200
Message-ID: <20110705131959.E73FE15921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0801229327788437722=="
--===============0801229327788437722==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: hudson
Date: 2011-07-05 15:19:59 +0200 (Tue, 05 Jul 2011)
New Revision: 91
Url: http://nuiton.org/repositories/revision/nuiton-web/91
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-07-05 13:19:58 UTC (rev 90)
+++ trunk/nuiton-gwt/pom.xml 2011-07-05 13:19:59 UTC (rev 91)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.2
+ 1.3-SNAPSHOT
=20
nuiton-gwt
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-07-05 13:19:58 UTC (rev 90)
+++ trunk/nuiton-rss/pom.xml 2011-07-05 13:19:59 UTC (rev 91)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.2
+ 1.3-SNAPSHOT
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-07-05 13:19:58 UTC (rev 90)
+++ trunk/nuiton-struts2/pom.xml 2011-07-05 13:19:59 UTC (rev 91)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.2
+ 1.3-SNAPSHOT
=20
nuiton-struts2
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-07-05 13:19:58 UTC (rev 90)
+++ trunk/nuiton-tapestry/pom.xml 2011-07-05 13:19:59 UTC (rev 91)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.2
+ 1.3-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-07-05 13:19:58 UTC (rev 90)
+++ trunk/nuiton-web/pom.xml 2011-07-05 13:19:59 UTC (rev 91)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.2
+ 1.3-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-07-05 13:19:58 UTC (rev 90)
+++ trunk/pom.xml 2011-07-05 13:19:59 UTC (rev 91)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.2
+ 1.3-SNAPSHOT
=20
nuiton-web
@@ -292,11 +292,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-1.2
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-1.2
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-1.2
+ http://www.nuiton.org/repositories/browse/nuiton-web/trunk
=20
--===============0801229327788437722==--
From hudson@users.nuiton.org Tue Jul 5 15:19:59 2011
From: hudson@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r90 - tags
Date: Tue, 05 Jul 2011 15:19:59 +0200
Message-ID: <20110705131959.00CE5157EE@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4424358280725383211=="
--===============4424358280725383211==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: hudson
Date: 2011-07-05 15:19:58 +0200 (Tue, 05 Jul 2011)
New Revision: 90
Url: http://nuiton.org/repositories/revision/nuiton-web/90
Log:
[maven-release-plugin] copy for tag nuiton-web-1.2
Added:
tags/nuiton-web-1.2/
--===============4424358280725383211==--
From tchemit@users.nuiton.org Thu Jul 7 20:02:25 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r92 - in trunk: .
nuiton-struts2/src/main/java/org/nuiton/web/struts2
nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor
Date: Thu, 07 Jul 2011 20:02:25 +0200
Message-ID: <20110707180225.7A76815921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7853633829903669858=="
--===============7853633829903669858==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-07-07 20:02:25 +0200 (Thu, 07 Jul 2011)
New Revision: 92
Url: http://nuiton.org/repositories/revision/nuiton-web/92
Log:
Evolution #1627: Updates to ToPIA 2.6.1
Evolution #1624: Remove TopiaTransactionAware
Evolution #1628: Improve the TopiaTransactionInterceptor
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransaction=
Aware.java
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Topi=
aTransactionInterceptor.java
trunk/pom.xml
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTran=
sactionAware.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-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransactio=
nAware.java 2011-07-05 13:19:59 UTC (rev 91)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransactio=
nAware.java 2011-07-07 18:02:25 UTC (rev 92)
@@ -37,22 +37,9 @@
*
* @author tchemit
* @since 1.2
+ * @deprecated since 1.4, prefer use the same class in topia project., will =
be remove soon
*/
-public interface TopiaTransactionAware {
+@Deprecated
+public interface TopiaTransactionAware extends org.nuiton.topia.framework.To=
piaTransactionAware {
=20
- /**
- * Obtains the internal transaction.
- *
- * If no transaction was opened, can return the {@code null} object.
- *
- * @return the current transaction (can be null or closed...).
- */
- TopiaContext getTransaction();
-
- /**
- * Put in the instance, the given transaction.
- *
- * @param transaction the transaction to push
- */
- void setTransaction(TopiaContext transaction);
}
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/intercept=
or/TopiaTransactionInterceptor.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-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Top=
iaTransactionInterceptor.java 2011-07-05 13:19:59 UTC (rev 91)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Top=
iaTransactionInterceptor.java 2011-07-07 18:02:25 UTC (rev 92)
@@ -136,51 +136,58 @@
@Override
public String intercept(ActionInvocation invocation) throws Exception {
=20
- TopiaTransactionAware transactionAware =3D null;
+ org.nuiton.topia.framework.TopiaTransactionAware transactionAware =
=3D null;
=20
Object action =3D invocation.getProxy().getAction();
=20
- if (action instanceof TopiaTransactionAware) {
- transactionAware =3D (TopiaTransactionAware) action;
+ if (action instanceof org.nuiton.topia.framework.TopiaTransactionAwa=
re) {
+ transactionAware =3D (org.nuiton.topia.framework.TopiaTransactio=
nAware) action;
}
=20
- TopiaContext transaction =3D null;
- if (transactionAware !=3D null) {
+ if (transactionAware =3D=3D null) {
=20
- // action need a transaction
- transaction =3D beginTransaction();
+ // not a transaction aware action
+ return invocation.invoke();
+ }
=20
- if (log.isDebugEnabled()) {
- log.debug("Open transaction " + transaction);
- }
- // creates a proxy on the transaction to push back in action
- TopiaContext proxy =3D (TopiaContext) Proxy.newProxyInstance(
- getClass().getClassLoader(),
- new Class>[]{TopiaContext.class,
- TopiaContextImplementor.class},
- new TopiaTransactionProxyInvocationHandler(transaction)
- );
+ // action need a transaction
+ TopiaContext transaction =3D beginTransaction();
=20
- // set the transaction in the action
- transactionAware.setTransaction(proxy);
+ if (log.isDebugEnabled()) {
+ log.debug("Open transaction " + transaction);
}
+
+ // creates a proxy on the transaction to push back in action
+ TopiaContext proxy =3D (TopiaContext) Proxy.newProxyInstance(
+ getClass().getClassLoader(),
+ new Class>[]{TopiaContext.class,
+ TopiaContextImplementor.class},
+ new TopiaTransactionProxyInvocationHandler(transaction)
+ );
+
+ // set the transaction in the action
+ transactionAware.setTransaction(proxy);
+
+ boolean doCommit =3D true;
try {
return invocation.invoke();
- } finally {
+ } catch (Exception e) {
=20
- if (transactionAware !=3D null) {
+ doCommit =3D false;
+ transaction.rollbackTransaction();
=20
- // we are on a action with a internal topia transaction
+ throw e;
+ } finally {
=20
- if (transaction !=3D null && !transaction.isClosed()) {
+ if (doCommit) {
+ transaction.commitTransaction();
+ }
=20
- if (log.isDebugEnabled()) {
- log.debug("Close transaction " + transaction);
- }
- // close the opened transaction
- transaction.closeContext();
- }
+ if (log.isDebugEnabled()) {
+ log.debug("Close transaction " + transaction);
}
+ // close the opened transaction
+ transaction.closeContext();
}
}
=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-07-05 13:19:59 UTC (rev 91)
+++ trunk/pom.xml 2011-07-07 18:02:25 UTC (rev 92)
@@ -215,7 +215,7 @@
=20
2.41.2
- 2.6
+ 2.6.1-SNAPSHOT
=20
5.2.4
--===============7853633829903669858==--
From tchemit@users.nuiton.org Fri Jul 8 09:19:00 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r93 - in
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2: . interceptor
Date: Fri, 08 Jul 2011 09:19:00 +0200
Message-ID: <20110708071900.90EEA15921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0810443392210307267=="
--===============0810443392210307267==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-07-08 09:19:00 +0200 (Fri, 08 Jul 2011)
New Revision: 93
Url: http://nuiton.org/repositories/revision/nuiton-web/93
Log:
Evolution #1624: Remove TopiaTransactionAware
Evolution #1628: Improve the TopiaTransactionInterceptor
Removed:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransaction=
Aware.java
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Topi=
aTransactionInterceptor.java
Deleted: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTrans=
actionAware.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-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransactio=
nAware.java 2011-07-07 18:02:25 UTC (rev 92)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/TopiaTransactio=
nAware.java 2011-07-08 07:19:00 UTC (rev 93)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * Nuiton Web :: Nuiton Struts 2
- *=20
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 - 2011 CodeLutin, Tony Chemit
- * %%
- * 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.struts2;
-
-import org.nuiton.topia.TopiaContext;
-
-/**
- * Use this contract on a object which use a {@code TopiaContext} as a
- * transaction.
- *
- * The method {@link #getTransaction()} returns the internal transaction use=
d.
- *
- * the method {@link #setTransaction(TopiaContext)} put the internal
- * transaction.
- *
- * @author tchemit
- * @since 1.2
- * @deprecated since 1.4, prefer use the same class in topia project., will =
be remove soon
- */
-@Deprecated
-public interface TopiaTransactionAware extends org.nuiton.topia.framework.To=
piaTransactionAware {
-
-}
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/intercept=
or/TopiaTransactionInterceptor.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-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Top=
iaTransactionInterceptor.java 2011-07-07 18:02:25 UTC (rev 92)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Top=
iaTransactionInterceptor.java 2011-07-08 07:19:00 UTC (rev 93)
@@ -32,8 +32,12 @@
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaContextImplementor;
-import org.nuiton.web.struts2.TopiaTransactionAware;
+import org.nuiton.topia.framework.TopiaTransactionAware;
=20
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
@@ -45,25 +49,28 @@
/**
*
*
- * The aim of this Interceptor is to inject a freshly opened {@code transact=
ion}
- * in a action which implements {@link TopiaTransactionAware} contract and
- * after result of action, to close the transaction.
+ * The aim of this Interceptor is to manage a {@code transaction} all along
+ * a action which implements {@link TopiaTransactionAware}
+ * contract.
*
+ * Technicaly, the action will receive only a proxy of a transaction and a r=
eal
+ * transaction will only be created as soon as a method will be asked on it.
+ *
* The interceptor is abstract and let user to implement the way how to open=
a
* new transaction via the method {@link #beginTransaction()}.
*
- * Note that the transaction pushed in the action is in fact a proxy of the
- * freshly opened transaction to forbid some method to be call on it. The li=
st
- * of method to forbid can be customized using the interceptor parameter
- * {@link #excludeMethods}.
+ * Note that the transaction pushed in the action can be limited using a list
+ * of methods to exclude on it. The list of methods to forbid can be customi=
zed
+ * using the interceptor parameter {@link #excludeMethods}.
*
- * Note also that the transaction is closed after all stack of interceptor
- * consumed, this means that the transaction will still be opened while
- * rendering the result, this is a particular interesting thing to avoid
+ * Note also that the transaction is commited and closed after all stack of
+ * interceptor consumed, this means that the transaction will still be opened
+ * while rendering the result, this is a particular interesting thing to avo=
id
* pre-loading of entities due to lazy strategy of hibernate for example.
* With this mecanism you can feel free to just obtain the obtain from datab=
ase
* via a DAO and then really load it in the rendering result.
*
+ * If you do not want any commit for a given action, just put on the class a=
commit
*
* This interceptor, as it provides connection to database should be in the
* interceptor stack before any other interceptor requiring access to databa=
se.
@@ -89,6 +96,12 @@
*/
public abstract class TopiaTransactionInterceptor extends AbstractIntercepto=
r {
=20
+ /** To specify on your action that you never want any commit. */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ElementType.TYPE, ElementType.METHOD})
+ public @interface NoCommit {
+ }
+
/** Logger. */
private static final Log log =3D
LogFactory.getLog(TopiaTransactionInterceptor.class);
@@ -109,7 +122,8 @@
}
=20
public void setExcludeMethods(String excludeMethods) {
- this.excludeMethods =3D TextParseUtil.commaDelimitedStringToSet(excl=
udeMethods);
+ this.excludeMethods =3D
+ TextParseUtil.commaDelimitedStringToSet(excludeMethods);
}
=20
/**
@@ -136,59 +150,109 @@
@Override
public String intercept(ActionInvocation invocation) throws Exception {
=20
- org.nuiton.topia.framework.TopiaTransactionAware transactionAware =
=3D null;
+ TopiaTransactionAware transactionAware =3D null;
=20
Object action =3D invocation.getProxy().getAction();
=20
- if (action instanceof org.nuiton.topia.framework.TopiaTransactionAwa=
re) {
- transactionAware =3D (org.nuiton.topia.framework.TopiaTransactio=
nAware) action;
+ if (action instanceof TopiaTransactionAware) {
+ transactionAware =3D (TopiaTransactionAware) action;
}
=20
if (transactionAware =3D=3D null) {
=20
- // not a transaction aware action
+ // not a transaction aware action, direct skip this interceptor
return invocation.invoke();
}
=20
- // action need a transaction
- TopiaContext transaction =3D beginTransaction();
+ // creates a proxy of a lazy transaction
=20
- if (log.isDebugEnabled()) {
- log.debug("Open transaction " + transaction);
- }
+ TopiaTransactionProxyInvocationHandler proxyInvocationHandler =3D
+ new TopiaTransactionProxyInvocationHandler();
=20
- // creates a proxy on the transaction to push back in action
TopiaContext proxy =3D (TopiaContext) Proxy.newProxyInstance(
getClass().getClassLoader(),
new Class>[]{TopiaContext.class,
TopiaContextImplementor.class},
- new TopiaTransactionProxyInvocationHandler(transaction)
+ proxyInvocationHandler
);
=20
// set the transaction in the action
transactionAware.setTransaction(proxy);
=20
- boolean doCommit =3D true;
+ boolean doCommit =3D isCommitNeeded(action, invocation);
try {
return invocation.invoke();
} catch (Exception e) {
=20
doCommit =3D false;
- transaction.rollbackTransaction();
+ TopiaContext transaction =3D proxyInvocationHandler.getTransacti=
on();
=20
+ if (transaction !=3D null && !transaction.isClosed()) {
+ if (log.isDebugEnabled()) {
+ log.debug("rollback transaction " + transaction);
+ }
+ transaction.rollbackTransaction();
+ }
+
throw e;
} finally {
=20
- if (doCommit) {
- transaction.commitTransaction();
+ TopiaContext transaction =3D proxyInvocationHandler.getTransacti=
on();
+
+ if (transaction !=3D null && !transaction.isClosed()) {
+ try {
+ if (doCommit) {
+
+ // commit the opened transaction
+ if (log.isDebugEnabled()) {
+ log.debug("Commit transaction " + transaction);
+ }
+ transaction.commitTransaction();
+ }
+ } finally {
+
+ // close the opened transaction
+ if (log.isDebugEnabled()) {
+ log.debug("Close transaction " + transaction);
+ }
+ transaction.closeContext();
+ }
+
}
=20
+ }
+ }
+
+ protected boolean isCommitNeeded(Object action,
+ ActionInvocation invocation) throws NoSuc=
hMethodException {
+ Class> actionType =3D action.getClass();
+ boolean noCommit =3D actionType.isAnnotationPresent(NoCommit.class);
+ if (noCommit) {
+
+ // a no commit annotation was found on the top of action
if (log.isDebugEnabled()) {
- log.debug("Close transaction " + transaction);
+ log.debug("NoCommit annotation found on action " +
+ actionType.getName());
}
- // close the opened transaction
- transaction.closeContext();
+ return false;
}
+
+ // try to look on the methodName
+ String methodName =3D invocation.getProxy().getMethod();
+ if (methodName =3D=3D null) {
+
+ // no methodName specify, means the execute one
+ methodName =3D "execute";
+ }
+ Method method =3D actionType.getMethod(methodName);
+ noCommit =3D method.isAnnotationPresent(NoCommit.class);
+ if (noCommit) {
+ if (log.isDebugEnabled()) {
+ log.debug("NoCommit annotation found on action methodName "=
+
+ actionType.getName() + "#" + methodName);
+ }
+ }
+ return !noCommit;
}
=20
/**
@@ -196,13 +260,13 @@
*
* @see TopiaTransactionInterceptor#excludeMethods
*/
- class TopiaTransactionProxyInvocationHandler implements InvocationHandle=
r {
+ public class TopiaTransactionProxyInvocationHandler implements Invocatio=
nHandler {
=20
/** Target to use for the proxy. */
- protected final TopiaContext tx;
+ protected TopiaContext transaction;
=20
- TopiaTransactionProxyInvocationHandler(TopiaContext tx) {
- this.tx =3D tx;
+ public TopiaContext getTransaction() {
+ return transaction;
}
=20
@Override
@@ -220,9 +284,18 @@
proxy);
}
=20
- // can invoke the method on the tx
+ if (transaction =3D=3D null) {
+
+ // first time transaction is required, create its
+ transaction =3D beginTransaction();
+
+ if (log.isDebugEnabled()) {
+ log.debug("Open transaction " + transaction);
+ }
+ }
+ // can invoke the method on the transaction
try {
- Object result =3D method.invoke(tx, args);
+ Object result =3D method.invoke(transaction, args);
return result;
} catch (Exception eee) {
if (log.isErrorEnabled()) {
--===============0810443392210307267==--
From tchemit@users.nuiton.org Tue Jul 19 16:35:15 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r94 -
trunk/nuiton-struts2/src/main/resources/template/simple
Date: Tue, 19 Jul 2011 16:35:15 +0200
Message-ID: <20110719143515.76A9C157EE@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4175080841916008755=="
--===============4175080841916008755==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-07-19 16:35:15 +0200 (Tue, 19 Jul 2011)
New Revision: 94
Url: http://nuiton.org/repositories/revision/nuiton-web/94
Log:
Anomalie #1633: mycheckboxlist does not work under firefox
Modified:
trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ftl
Modified: trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxl=
ist.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-07-08 07:19:00 UTC (rev 93)
+++ trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-07-19 14:35:15 UTC (rev 94)
@@ -30,9 +30,9 @@
@s.iterator>
<#if !parameters.disabled?default(false) && (itemCount > 0)>
-Tout s=C3=A9lectionner
+Tout s=C3=A9lectionner
-Tout d=C3=A9s=C3=A9lectionner
+Tout d=C3=A9s=C3=A9lectionner
#if>
<#else>
--===============4175080841916008755==--
From tchemit@users.nuiton.org Tue Jul 19 19:07:51 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r95 - in
trunk/nuiton-struts2/src/main/resources: . i18n template/simple
Date: Tue, 19 Jul 2011 19:07:51 +0200
Message-ID: <20110719170751.3EAE0157EE@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8621435690813004450=="
--===============8621435690813004450==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-07-19 19:07:51 +0200 (Tue, 19 Jul 2011)
New Revision: 95
Url: http://nuiton.org/repositories/revision/nuiton-web/95
Log:
Evolution #1635: use i18n in template mycheckboxlist
Added:
trunk/nuiton-struts2/src/main/resources/i18n/
trunk/nuiton-struts2/src/main/resources/i18n/nuiton-struts2_en_GB.properti=
es
trunk/nuiton-struts2/src/main/resources/i18n/nuiton-struts2_fr_FR.properti=
es
Modified:
trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ftl
Added: trunk/nuiton-struts2/src/main/resources/i18n/nuiton-struts2_en_GB.prop=
erties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/i18n/nuiton-struts2_en_GB.propert=
ies (rev 0)
+++ trunk/nuiton-struts2/src/main/resources/i18n/nuiton-struts2_en_GB.propert=
ies 2011-07-19 17:07:51 UTC (rev 95)
@@ -0,0 +1,2 @@
+nuiton-struts2.selectAll=3DSelect all
+nuiton-struts2.unselectAll=3DUnselect all
\ No newline at end of file
Property changes on: trunk/nuiton-struts2/src/main/resources/i18n/nuiton-stru=
ts2_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/nuiton-struts2/src/main/resources/i18n/nuiton-struts2_fr_FR.prop=
erties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/i18n/nuiton-struts2_fr_FR.propert=
ies (rev 0)
+++ trunk/nuiton-struts2/src/main/resources/i18n/nuiton-struts2_fr_FR.propert=
ies 2011-07-19 17:07:51 UTC (rev 95)
@@ -0,0 +1,2 @@
+nuiton-struts2.selectAll=3DTout s=C3=A9lectionner
+nuiton-struts2.unselectAll=3DTout d=C3=A9s=C3=A9lectionner
\ No newline at end of file
Property changes on: trunk/nuiton-struts2/src/main/resources/i18n/nuiton-stru=
ts2_fr_FR.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxl=
ist.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-07-19 14:35:15 UTC (rev 94)
+++ trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-07-19 17:07:51 UTC (rev 95)
@@ -30,9 +30,9 @@
@s.iterator>
<#if !parameters.disabled?default(false) && (itemCount > 0)>
-Tout s=C3=A9lectionner
+<@s.text name=3D"nuiton-struts2.selectAll"/>
-Tout d=C3=A9s=C3=A9lectionner
+<@s.text name=3D"nuiton-struts2.unselectAll"/>
#if>
<#else>
--===============8621435690813004450==--
From jcouteau@users.nuiton.org Fri Jul 22 15:41:22 2011
From: jcouteau@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r96 -
trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table
Date: Fri, 22 Jul 2011 15:41:22 +0200
Message-ID: <20110722134122.19410157E0@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0268232957859683421=="
--===============0268232957859683421==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: jcouteau
Date: 2011-07-22 15:41:22 +0200 (Fri, 22 Jul 2011)
New Revision: 96
Url: http://nuiton.org/repositories/revision/nuiton-web/96
Log:
#1638 : ArrayOutOfBoundException if the model is empty
Modified:
trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableTableModel=
.java
Modified: trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableTab=
leModel.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/table/SortableTableMode=
l.java 2011-07-19 17:07:51 UTC (rev 95)
+++ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableTableMode=
l.java 2011-07-22 13:41:22 UTC (rev 96)
@@ -81,8 +81,12 @@
=20
@Override
public Object getValueAt(int col, int row) {
-
- int modelRow =3D rowsOrder[row];
+ =20
+ int modelRow =3D 0;
+ =20
+ if (rowsOrder.length > 0) {
+ modelRow =3D rowsOrder[row];
+ }
return model.getValueAt(col, modelRow);
}
=20
@@ -154,6 +158,9 @@
}
=20
protected void initRowsOrder() {
+ =20
+ System.out.println("init rows order");
+ =20
int rowCount =3D model.getRowCount();
rowsOrder =3D new int[rowCount];
for (int i =3D 0;i
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4247674300676047689=="
--===============4247674300676047689==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: jcouteau
Date: 2011-07-30 03:28:16 +0200 (Sat, 30 Jul 2011)
New Revision: 97
Url: http://nuiton.org/repositories/revision/nuiton-web/97
Log:
#1642 : SortableFlexTable does not update correctly
Modified:
trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableFlexTableW=
ithModel.java
Modified: trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableFle=
xTableWithModel.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/table/SortableFlexTable=
WithModel.java 2011-07-22 13:41:22 UTC (rev 96)
+++ trunk/nuiton-gwt/src/main/java/org/nuiton/web/gwt/table/SortableFlexTable=
WithModel.java 2011-07-30 01:28:16 UTC (rev 97)
@@ -34,6 +34,9 @@
implements TableModelListener, ClickHandler {
=20
SortableTableModel model;
+ =20
+ //number of rows for update
+ int rows =3D 0;
=20
public SortableFlexTableWithModel() {
super();
@@ -53,7 +56,7 @@
this.model.removeTableModelListener(this);
}
this.model =3D model;
- this.model.addTableModelListener(this);
+ getModel().addTableModelListener(this);
}
=20
public SortableTableModel getModel() {
@@ -66,8 +69,9 @@
int firstColumn =3D event.getColumn();
int lastColumn =3D event.getColumn();
int type =3D event.getType();
-
-
+ =20
+ int oldRows =3D rows;
+ =20
if (firstColumn =3D=3D TableModelEvent.ALL_COLUMNS) {
firstColumn =3D 0;
lastColumn =3D getColumnCount() - 1;
@@ -96,17 +100,29 @@
if (firstRow =3D=3D lastRow) {
Object value =3D model.getValueAt(i, firstRow);
setValueAt(value, firstRow, i);
+ rows =3D 1;
} else {
- for (int j =3D firstRow; j <=3D lastRow; j++) {
+ for (int j =3D firstRow; j < lastRow; j++) {
if (j < model.getRowCount()) {
Object value =3D model.getValueAt(i, j);
setValueAt(value, j, i);
+ rows =3D j+1;
} else {
break;
}
}
}
+ =20
+ =20
}
+ =20
+ for (int i =3D rows; i < oldRows; i++) {
+ //remove all rows that are not in model anymore
+ if ((rows+1) < getRowCount()){
+ removeRow(rows+1);
+ }
+ }
+ =20
}
}
=20
--===============4247674300676047689==--
From athimel@users.nuiton.org Wed Aug 3 10:27:28 2011
From: athimel@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r98 - in trunk: . nuiton-struts2
nuiton-struts2/src nuiton-struts2/src/main/java/org/nuiton/web/struts2
nuiton-struts2/src/test nuiton-struts2/src/test/java
nuiton-struts2/src/test/java/org nuiton-struts2/src/test/java/org/nuiton
nuiton-struts2/src/test/java/org/nuiton/web
nuiton-struts2/src/test/java/org/nuiton/web/struts2
nuiton-struts2/src/test/resources nuiton-struts2/src/test/resources/META-INF
Date: Wed, 03 Aug 2011 10:27:27 +0200
Message-ID: <20110803082727.EAE6215921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2710084905363231118=="
--===============2710084905363231118==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: athimel
Date: 2011-08-03 10:27:27 +0200 (Wed, 03 Aug 2011)
New Revision: 98
Url: http://nuiton.org/repositories/revision/nuiton-web/98
Log:
#1651 : Create a TextProvider for Struts2 using nuiton's i18n
Added:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvider=
.java
trunk/nuiton-struts2/src/test/
trunk/nuiton-struts2/src/test/java/
trunk/nuiton-struts2/src/test/java/org/
trunk/nuiton-struts2/src/test/java/org/nuiton/
trunk/nuiton-struts2/src/test/java/org/nuiton/web/
trunk/nuiton-struts2/src/test/java/org/nuiton/web/struts2/
trunk/nuiton-struts2/src/test/java/org/nuiton/web/struts2/I18nTextProvider=
Test.java
trunk/nuiton-struts2/src/test/resources/
trunk/nuiton-struts2/src/test/resources/META-INF/
trunk/nuiton-struts2/src/test/resources/META-INF/toto-definition.properties
trunk/nuiton-struts2/src/test/resources/META-INF/toto_fr_FR.properties
Modified:
trunk/nuiton-struts2/pom.xml
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/BaseAction.java
trunk/pom.xml
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-07-30 01:28:16 UTC (rev 97)
+++ trunk/nuiton-struts2/pom.xml 2011-08-03 08:27:27 UTC (rev 98)
@@ -31,6 +31,11 @@
=20
+ org.nuiton.i18n
+ nuiton-i18n
+
+
+ org.nuiton.topiatopia-persistence
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/BaseActio=
n.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-struts2/src/main/java/org/nuiton/web/struts2/BaseAction.java=
2011-07-30 01:28:16 UTC (rev 97)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/BaseAction.java=
2011-08-03 08:27:27 UTC (rev 98)
@@ -25,13 +25,8 @@
package org.nuiton.web.struts2;
=20
import com.opensymphony.xwork2.ActionSupport;
-import com.opensymphony.xwork2.util.ValueStack;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
=20
import java.util.Arrays;
-import java.util.List;
=20
/**
* Base action to use for a better usage of I18n.
@@ -43,10 +38,6 @@
=20
private static final long serialVersionUID =3D 1L;
=20
- public static final String UNTRANSLATED_MARKER =3D "???";
-
- private static final Log log =3D LogFactory.getLog(BaseAction.class);
-
public String _(String aTextName) {
String value =3D getText(aTextName);
return value;
@@ -57,80 +48,4 @@
return value;
}
=20
- @Override
- public String getText(String aTextName) {
- String value =3D super.getText(aTextName);
- return getSafeText(aTextName, value);
- }
-
- @Override
- public String getText(String aTextName, String defaultValue) {
- String value =3D super.getText(aTextName, defaultValue);
- return getSafeText(aTextName, value);
- }
-
- @Override
- public String getText(String aTextName,
- String defaultValue,
- String obj) {
- String value =3D super.getText(aTextName, defaultValue, obj);
- return getSafeText(aTextName, value);
- }
-
- @Override
- public String getText(String aTextName, List> args) {
- String value =3D super.getText(aTextName, args);
- return getSafeText(aTextName, value);
- }
-
- @Override
- public String getText(String key, String[] args) {
- String value =3D super.getText(key, args);
- return getSafeText(key, value);
- }
-
- @Override
- public String getText(String aTextName,
- String defaultValue,
- List> args) {
- String value =3D super.getText(aTextName, defaultValue, args);
- return getSafeText(aTextName, value);
- }
-
- @Override
- public String getText(String key,
- String defaultValue,
- String[] args) {
- String value =3D super.getText(key, defaultValue, args);
- return getSafeText(key, value);
- }
-
- @Override
- public String getText(String key,
- String defaultValue,
- List> args,
- ValueStack stack) {
- String value =3D super.getText(key, defaultValue, args, stack);
- return getSafeText(key, value);
- }
-
- @Override
- public String getText(String key,
- String defaultValue,
- String[] args,
- ValueStack stack) {
- String value =3D super.getText(key, defaultValue, args, stack);
- return getSafeText(key, value);
- }
-
- protected String getSafeText(String key, String value) {
- if (StringUtils.isEmpty(value)) {
- if (log.isWarnEnabled()) {
- log.warn("Key [" + key + "] is not translated");
- }
- return UNTRANSLATED_MARKER + key + UNTRANSLATED_MARKER;
- }
- return value;
- }
-
}
Added: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProv=
ider.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-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvide=
r.java (rev 0)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvide=
r.java 2011-08-03 08:27:27 UTC (rev 98)
@@ -0,0 +1,183 @@
+/*
+ * #%L
+ * Nuiton Web :: Nuiton Struts 2
+ *=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.struts2;
+
+import com.opensymphony.xwork2.LocaleProvider;
+import com.opensymphony.xwork2.ResourceBundleTextProvider;
+import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.i18n.I18n;
+
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * Struts2's TextProvider implementation using nuiton's i18n
+ *
+ * @author Arnaud Thimel
+ * @since 1.3
+ */
+public class I18nTextProvider implements ResourceBundleTextProvider {
+
+ private static final Log log =3D LogFactory.getLog(BaseAction.class);
+
+ public static final String UNTRANSLATED_MARKER =3D "???";
+
+ protected LocaleProvider localeProvider;
+
+ protected String getSafeText(String key, String value) {
+ if (StringUtils.isEmpty(value)) {
+ if (log.isWarnEnabled()) {
+ log.warn("Key [" + key + "] is not translated");
+ }
+ return UNTRANSLATED_MARKER + key + UNTRANSLATED_MARKER;
+ }
+ return value;
+ }
+
+ @Override
+ public void setBundle(ResourceBundle bundle) {
+ // Nothing to do
+ }
+
+ @Override
+ public void setClazz(Class clazz) {
+ // Nothing to do
+ }
+
+ @Override
+ public void setLocaleProvider(LocaleProvider localeProvider) {
+ this.localeProvider =3D localeProvider;
+ }
+
+ @Override
+ public boolean hasKey(String key) {
+ Locale locale =3D localeProvider.getLocale();
+ boolean result =3D I18n.hasKey(locale, key);
+ return result;
+ }
+
+ protected String getTextFromLocale(String key, String defaultValue) {
+ Locale locale =3D localeProvider.getLocale();
+ String result =3D I18n.l_(locale, key);
+ if (result =3D=3D null) {
+ result =3D defaultValue;
+ }
+ result =3D getSafeText(key, result);
+ return result;
+ }
+
+ protected String getTextFromLocale(String key, String defaultValue, Obje=
ct ... args) {
+ Locale locale =3D localeProvider.getLocale();
+ String result =3D I18n.l_(locale, key, args);
+ if (result =3D=3D null) {
+ result =3D defaultValue;
+ }
+ result =3D getSafeText(key, result);
+ return result;
+ }
+
+ @Override
+ public String getText(String aTextName) {
+ String value =3D getTextFromLocale(aTextName, null);
+ return value;
+ }
+
+ @Override
+ public String getText(String aTextName, String defaultValue) {
+ String value =3D getTextFromLocale(aTextName, defaultValue);
+ return value;
+ }
+
+ @Override
+ public String getText(String aTextName,
+ String defaultValue,
+ String obj) {
+ String value =3D getTextFromLocale(aTextName, defaultValue, obj);
+ return value;
+ }
+
+ @Override
+ public String getText(String aTextName, List> args) {
+ Object[] array =3D args.toArray();
+ String value =3D getTextFromLocale(aTextName, null, array);
+ return value;
+ }
+
+ @Override
+ public String getText(String key, String[] args) {
+ String value =3D getTextFromLocale(key, null, args);
+ return value;
+ }
+
+ @Override
+ public String getText(String aTextName,
+ String defaultValue,
+ List> args) {
+ Object[] array =3D args.toArray();
+ String value =3D getTextFromLocale(aTextName, defaultValue, array);
+ return value;
+ }
+
+ @Override
+ public String getText(String key,
+ String defaultValue,
+ String[] args) {
+ String value =3D getTextFromLocale(key, defaultValue, args);
+ return value;
+ }
+
+ @Override
+ public String getText(String key,
+ String defaultValue,
+ List> args,
+ ValueStack stack) {
+ String value =3D getText(key, defaultValue, args);
+ return value;
+ }
+
+ @Override
+ public String getText(String key,
+ String defaultValue,
+ String[] args,
+ ValueStack stack) {
+ String value =3D getText(key, defaultValue, args);
+ return value;
+ }
+
+ @Override
+ public ResourceBundle getTexts(String bundleName) {
+ return null;
+ }
+
+ @Override
+ public ResourceBundle getTexts() {
+ return null;
+ }
+
+}
Property changes on: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts=
2/I18nTextProvider.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/nuiton-struts2/src/test/java/org/nuiton/web/struts2/I18nTextProv=
iderTest.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-struts2/src/test/java/org/nuiton/web/struts2/I18nTextProvide=
rTest.java (rev 0)
+++ trunk/nuiton-struts2/src/test/java/org/nuiton/web/struts2/I18nTextProvide=
rTest.java 2011-08-03 08:27:27 UTC (rev 98)
@@ -0,0 +1,95 @@
+/*
+ * #%L
+ * Nuiton Web :: Nuiton Struts 2
+ *=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.struts2;
+
+import com.opensymphony.xwork2.LocaleProvider;
+import junit.framework.Assert;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.nuiton.i18n.I18n;
+import org.nuiton.i18n.init.DefaultI18nInitializer;
+
+import java.util.Arrays;
+import java.util.Locale;
+
+public class I18nTextProviderTest {
+
+ protected I18nTextProvider provider;
+ @After
+ public void after() throws Exception {
+ I18n.close();
+ }
+
+ @Before
+ public void init() throws Exception {
+
+ DefaultI18nInitializer initializer =3D new DefaultI18nInitializer("t=
oto");
+ initializer.setMissingKeyReturnNull(true);
+ I18n.init(initializer, Locale.FRENCH);
+
+ provider =3D new I18nTextProvider();
+ provider.setLocaleProvider(new LocaleProvider() {
+ @Override
+ public Locale getLocale() {
+ return Locale.FRENCH;
+ }
+ });
+
+ }
+
+ @Test
+ public void testHasKey() throws Exception {
+ Assert.assertFalse(provider.hasKey("missing"));
+ Assert.assertTrue(provider.hasKey("present"));
+ }
+
+ @Test
+ public void testGetTextSimple() throws Exception {
+ Assert.assertEquals("yes", provider.getText("present"));
+ Assert.assertEquals(I18nTextProvider.UNTRANSLATED_MARKER + "missing"=
+ I18nTextProvider.UNTRANSLATED_MARKER, provider.getText("missing"));
+ }
+
+ @Test
+ public void testGetTextDefaultValue() throws Exception {
+ Assert.assertEquals("yes", provider.getText("present", "toto"));
+ Assert.assertEquals("toto", provider.getText("missing", "toto"));
+ }
+
+ @Test
+ public void testGetTextArg() throws Exception {
+ Assert.assertEquals("Hello Arno !", provider.getText("hello", null, =
"Arno"));
+ }
+
+ @Test
+ public void testGetTextArgs() throws Exception {
+ Assert.assertEquals("Hello Arno, =C3=A7a biche ?", provider.getText(=
"hello_plus", new String[] {"Arno", "=C3=A7a biche"}));
+ Assert.assertEquals("Hello Moto, =C3=A7a gaze ?", provider.getText("=
hello_plus", Arrays.asList("Moto", "=C3=A7a gaze")));
+
+ Assert.assertEquals("Bonjour", provider.getText("hello_moins", "Bonj=
our", new String[] {"Arno", "=C3=A7a biche"}));
+ Assert.assertEquals("Bonjour", provider.getText("hello_moins", "Bonj=
our", Arrays.asList("Moto", "=C3=A7a gaze")));
+ }
+
+}
Property changes on: trunk/nuiton-struts2/src/test/java/org/nuiton/web/struts=
2/I18nTextProviderTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/nuiton-struts2/src/test/resources/META-INF/toto-definition.prope=
rties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/test/resources/META-INF/toto-definition.properti=
es (rev 0)
+++ trunk/nuiton-struts2/src/test/resources/META-INF/toto-definition.properti=
es 2011-08-03 08:27:27 UTC (rev 98)
@@ -0,0 +1,28 @@
+###
+# #%L
+# Nuiton Web :: Nuiton Struts 2
+#=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%
+###
+
+bundles.fr_FR=3DbundleTest/toto_fr_FR.properties
+encoding=3Dutf-8
+locales=3Dfr_FR
Property changes on: trunk/nuiton-struts2/src/test/resources/META-INF/toto-de=
finition.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/nuiton-struts2/src/test/resources/META-INF/toto_fr_FR.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-struts2/src/test/resources/META-INF/toto_fr_FR.properties =
(rev 0)
+++ trunk/nuiton-struts2/src/test/resources/META-INF/toto_fr_FR.properties 20=
11-08-03 08:27:27 UTC (rev 98)
@@ -0,0 +1,27 @@
+###
+# #%L
+# Nuiton Web :: Nuiton Struts 2
+#=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%
+###
+present=3Dyes
+hello=3DHello %s !
+hello_plus=3DHello %s, %s ?
\ No newline at end of file
Property changes on: trunk/nuiton-struts2/src/test/resources/META-INF/toto_fr=
_FR.properties
___________________________________________________________________
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-07-30 01:28:16 UTC (rev 97)
+++ trunk/pom.xml 2011-08-03 08:27:27 UTC (rev 98)
@@ -110,6 +110,14 @@
=20
+ org.nuiton.i18n
+ nuiton-i18n
+ ${nuitonI18nVersion}
+ provided
+
+
+
+ org.nuiton.topiatopia-persistence${topiaVersion}
@@ -213,7 +221,9 @@
nuiton-web
=20
- 2.4
+ 2.4.1-SNAPSHOT
+
+ ${nuitonI18nVersion}1.22.6.1-SNAPSHOT
=20
--===============2710084905363231118==--
From tchemit@users.nuiton.org Thu Aug 4 09:51:42 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r99 -
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2
Date: Thu, 04 Aug 2011 09:51:42 +0200
Message-ID: <20110804075142.5D07115956@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1525178243784908332=="
--===============1525178243784908332==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-08-04 09:51:42 +0200 (Thu, 04 Aug 2011)
New Revision: 99
Url: http://nuiton.org/repositories/revision/nuiton-web/99
Log:
add little javadoc to use text provider
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvider=
.java
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextP=
rovider.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-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvide=
r.java 2011-08-03 08:27:27 UTC (rev 98)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvide=
r.java 2011-08-04 07:51:42 UTC (rev 99)
@@ -37,8 +37,14 @@
import java.util.ResourceBundle;
=20
/**
- * Struts2's TextProvider implementation using nuiton's i18n
+ * Struts2's TextProvider implementation using nuiton's i18n.
*
+ * To use this text provider add the two following lines in your strust.xml :
+ *
+ *
* @author Arnaud Thimel
* @since 1.3
*/
--===============1525178243784908332==--
From tchemit@users.nuiton.org Thu Aug 4 11:51:39 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r100 - trunk
Date: Thu, 04 Aug 2011 11:51:39 +0200
Message-ID: <20110804095139.BEF4A1595C@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8822354547850901311=="
--===============8822354547850901311==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-08-04 11:51:39 +0200 (Thu, 04 Aug 2011)
New Revision: 100
Url: http://nuiton.org/repositories/revision/nuiton-web/100
Log:
Update mavenpom4redmineAndCentral to 3.0.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-04 07:51:42 UTC (rev 99)
+++ trunk/pom.xml 2011-08-04 09:51:39 UTC (rev 100)
@@ -10,7 +10,7 @@
org.nuitonmavenpom4redmineAndCentral
- 2.5.5
+ 3.0org.nuiton.web
--===============8822354547850901311==--
From tchemit@users.nuiton.org Thu Aug 4 17:29:47 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r101 - trunk
Date: Thu, 04 Aug 2011 17:29:47 +0200
Message-ID: <20110804152947.8770D15921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2128666853598245715=="
--===============2128666853598245715==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-08-04 17:29:47 +0200 (Thu, 04 Aug 2011)
New Revision: 101
Url: http://nuiton.org/repositories/revision/nuiton-web/101
Log:
Evolution #1657: Updates to i18n 2.4.1
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-04 09:51:39 UTC (rev 100)
+++ trunk/pom.xml 2011-08-04 15:29:47 UTC (rev 101)
@@ -221,7 +221,7 @@
nuiton-web
- 2.4.1-SNAPSHOT
+ 2.4.1${nuitonI18nVersion}1.2
--===============2128666853598245715==--
From tchemit@users.nuiton.org Thu Aug 4 17:44:36 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r102 - trunk
Date: Thu, 04 Aug 2011 17:44:36 +0200
Message-ID: <20110804154436.A8EA915921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5735659223400574549=="
--===============5735659223400574549==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-08-04 17:44:36 +0200 (Thu, 04 Aug 2011)
New Revision: 102
Url: http://nuiton.org/repositories/revision/nuiton-web/102
Log:
Evolution #1627: Updates to ToPIA 2.6.1
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-04 15:29:47 UTC (rev 101)
+++ trunk/pom.xml 2011-08-04 15:44:36 UTC (rev 102)
@@ -225,7 +225,7 @@
${nuitonI18nVersion}1.2
- 2.6.1-SNAPSHOT
+ 2.6.15.2.4
--===============5735659223400574549==--
From hudson@users.nuiton.org Thu Aug 4 17:55:57 2011
From: hudson@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r103 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Thu, 04 Aug 2011 17:55:57 +0200
Message-ID: <20110804155557.CE64715921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7511316902548205561=="
--===============7511316902548205561==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: hudson
Date: 2011-08-04 17:55:57 +0200 (Thu, 04 Aug 2011)
New Revision: 103
Url: http://nuiton.org/repositories/revision/nuiton-web/103
Log:
[maven-release-plugin] prepare release nuiton-web-1.3
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-08-04 15:44:36 UTC (rev 102)
+++ trunk/nuiton-gwt/pom.xml 2011-08-04 15:55:57 UTC (rev 103)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.3-SNAPSHOT
+ 1.3
=20
nuiton-gwt
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-08-04 15:44:36 UTC (rev 102)
+++ trunk/nuiton-rss/pom.xml 2011-08-04 15:55:57 UTC (rev 103)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.3-SNAPSHOT
+ 1.3
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-08-04 15:44:36 UTC (rev 102)
+++ trunk/nuiton-struts2/pom.xml 2011-08-04 15:55:57 UTC (rev 103)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.3-SNAPSHOT
+ 1.3
=20
nuiton-struts2
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-08-04 15:44:36 UTC (rev 102)
+++ trunk/nuiton-tapestry/pom.xml 2011-08-04 15:55:57 UTC (rev 103)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.3-SNAPSHOT
+ 1.3
=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-08-04 15:44:36 UTC (rev 102)
+++ trunk/nuiton-web/pom.xml 2011-08-04 15:55:57 UTC (rev 103)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.3-SNAPSHOT
+ 1.3
=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-08-04 15:44:36 UTC (rev 102)
+++ trunk/pom.xml 2011-08-04 15:55:57 UTC (rev 103)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.3-SNAPSHOT
+ 1.3
=20
nuiton-web
@@ -302,11 +302,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.3
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-1.3
- http://www.nuiton.org/repositories/browse/nuiton-web/trunk
+ http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-1.3
=20
--===============7511316902548205561==--
From hudson@users.nuiton.org Thu Aug 4 17:55:59 2011
From: hudson@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r104 - tags
Date: Thu, 04 Aug 2011 17:55:59 +0200
Message-ID: <20110804155559.A236915921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8882753920178917940=="
--===============8882753920178917940==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: hudson
Date: 2011-08-04 17:55:59 +0200 (Thu, 04 Aug 2011)
New Revision: 104
Url: http://nuiton.org/repositories/revision/nuiton-web/104
Log:
[maven-release-plugin] copy for tag nuiton-web-1.3
Added:
tags/nuiton-web-1.3/
--===============8882753920178917940==--
From hudson@users.nuiton.org Thu Aug 4 17:56:00 2011
From: hudson@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r105 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Thu, 04 Aug 2011 17:56:00 +0200
Message-ID: <20110804155600.BBAAF15921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8130760086288762972=="
--===============8130760086288762972==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: hudson
Date: 2011-08-04 17:56:00 +0200 (Thu, 04 Aug 2011)
New Revision: 105
Url: http://nuiton.org/repositories/revision/nuiton-web/105
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-08-04 15:55:59 UTC (rev 104)
+++ trunk/nuiton-gwt/pom.xml 2011-08-04 15:56:00 UTC (rev 105)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.3
+ 1.4-SNAPSHOT
=20
nuiton-gwt
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-08-04 15:55:59 UTC (rev 104)
+++ trunk/nuiton-rss/pom.xml 2011-08-04 15:56:00 UTC (rev 105)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.3
+ 1.4-SNAPSHOT
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-08-04 15:55:59 UTC (rev 104)
+++ trunk/nuiton-struts2/pom.xml 2011-08-04 15:56:00 UTC (rev 105)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.3
+ 1.4-SNAPSHOT
=20
nuiton-struts2
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-08-04 15:55:59 UTC (rev 104)
+++ trunk/nuiton-tapestry/pom.xml 2011-08-04 15:56:00 UTC (rev 105)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.3
+ 1.4-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-08-04 15:55:59 UTC (rev 104)
+++ trunk/nuiton-web/pom.xml 2011-08-04 15:56:00 UTC (rev 105)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.3
+ 1.4-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-08-04 15:55:59 UTC (rev 104)
+++ trunk/pom.xml 2011-08-04 15:56:00 UTC (rev 105)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.3
+ 1.4-SNAPSHOT
=20
nuiton-web
@@ -302,11 +302,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-1.3
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-1.3
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-1.3
+ http://www.nuiton.org/repositories/browse/nuiton-web/trunk
=20
--===============8130760086288762972==--
From tchemit@users.nuiton.org Fri Aug 5 04:12:33 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r106 -
trunk/nuiton-struts2/src/main/resources/template/simple
Date: Fri, 05 Aug 2011 04:12:33 +0200
Message-ID: <20110805021233.6015B15921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7286615722229361639=="
--===============7286615722229361639==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-08-05 04:12:33 +0200 (Fri, 05 Aug 2011)
New Revision: 106
Url: http://nuiton.org/repositories/revision/nuiton-web/106
Log:
Anomalie #1662: Can not use mycheckboxlist with nested id
Modified:
trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ftl
Modified: trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxl=
ist.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-08-04 15:56:00 UTC (rev 105)
+++ trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-08-05 02:12:33 UTC (rev 106)
@@ -1,3 +1,10 @@
+
<#assign itemCount =3D 0/>
<#if parameters.list??>
<@s.iterator value=3D"parameters.list">
@@ -30,9 +37,9 @@
@s.iterator>
<#if !parameters.disabled?default(false) && (itemCount > 0)>
-<@s.text name=3D"nuiton-struts2.selectAll"/>
+<@s.t=
ext name=3D"nuiton-struts2.selectAll"/>
-<@s.text name=3D"nuiton-struts2.unselectAll"/>
+<@s.=
text name=3D"nuiton-struts2.unselectAll"/>
#if>
<#else>
--===============7286615722229361639==--
From tchemit@users.nuiton.org Fri Aug 12 17:42:16 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r107 -
trunk/nuiton-struts2/src/main/resources/template/simple
Date: Fri, 12 Aug 2011 17:42:16 +0200
Message-ID: <20110812154216.7176915921@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8462630062883646966=="
--===============8462630062883646966==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-08-12 17:42:16 +0200 (Fri, 12 Aug 2011)
New Revision: 107
Url: http://nuiton.org/repositories/revision/nuiton-web/107
Log:
Anomalie #1662: Can not use mycheckboxlist with nested id
Modified:
trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ftl
Modified: trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxl=
ist.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-08-05 02:12:33 UTC (rev 106)
+++ trunk/nuiton-struts2/src/main/resources/template/simple/mycheckboxlist.ft=
l 2011-08-12 15:42:16 UTC (rev 107)
@@ -1,10 +1,3 @@
-
<#assign itemCount =3D 0/>
<#if parameters.list??>
<@s.iterator value=3D"parameters.list">
@@ -37,9 +30,9 @@
@s.iterator>
<#if !parameters.disabled?default(false) && (itemCount > 0)>
-<@s.t=
ext name=3D"nuiton-struts2.selectAll"/>
+<@s.text name=3D"nuiton-struts2.selectAll"/>
-<@s.=
text name=3D"nuiton-struts2.unselectAll"/>
+<@s.text name=3D"nuiton-struts2.unselectAll"/>
#if>
<#else>
--===============8462630062883646966==--
From tchemit@users.nuiton.org Wed Aug 17 01:12:04 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r108 - trunk
Date: Wed, 17 Aug 2011 01:12:04 +0200
Message-ID: <20110816231204.0CDBA59D81@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0456095016245672417=="
--===============0456095016245672417==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-08-17 01:12:03 +0200 (Wed, 17 Aug 2011)
New Revision: 108
Url: http://nuiton.org/repositories/revision/nuiton-web/108
Log:
Update mavenpom4redmineAndCentral to 3.0.1.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-12 15:42:16 UTC (rev 107)
+++ trunk/pom.xml 2011-08-16 23:12:03 UTC (rev 108)
@@ -10,7 +10,7 @@
org.nuitonmavenpom4redmineAndCentral
- 3.0
+ 3.0.1org.nuiton.web
--===============0456095016245672417==--
From tchemit@users.nuiton.org Thu Aug 18 07:25:28 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r109 - in trunk: nuiton-rss/src/license
nuiton-struts2/src/license nuiton-tapestry/src/license nuiton-web/src/license
Date: Thu, 18 Aug 2011 07:25:27 +0200
Message-ID: <20110818052527.EFD8A59D81@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2983161089513222889=="
--===============2983161089513222889==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-08-18 07:25:27 +0200 (Thu, 18 Aug 2011)
New Revision: 109
Url: http://nuiton.org/repositories/revision/nuiton-web/109
Log:
update third-parties
Modified:
trunk/nuiton-rss/src/license/THIRD-PARTY.properties
trunk/nuiton-struts2/src/license/THIRD-PARTY.properties
trunk/nuiton-tapestry/src/license/THIRD-PARTY.properties
trunk/nuiton-web/src/license/THIRD-PARTY.properties
Modified: 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 2011-08-16 23:12:03 U=
TC (rev 108)
+++ trunk/nuiton-rss/src/license/THIRD-PARTY.properties 2011-08-18 05:25:27 U=
TC (rev 109)
@@ -1,13 +1,20 @@
-# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#---------------------------------------------------------------------------=
----
# Already used licenses in project :
+# - Apache Software License Like
# - BSD License
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
+# - 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 :
#
#
-#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
+#Thu Aug 18 07:24:15 CEST 2011
+javax.servlet--servlet-api--2.5=3DSun Microsystems, Inc. Binary Code License=
Agreement for the JDK 5.0
+org.jdom--jdom--1.1=3DApache Software License Like
Modified: trunk/nuiton-struts2/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-struts2/src/license/THIRD-PARTY.properties 2011-08-16 23:12:=
03 UTC (rev 108)
+++ trunk/nuiton-struts2/src/license/THIRD-PARTY.properties 2011-08-18 05:25:=
27 UTC (rev 109)
@@ -2,10 +2,13 @@
#---------------------------------------------------------------------------=
----
# Already used licenses in project :
# - BSD License
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
# - MPL 1.1
# - The Apache Software License, Version 2.0
# - http://asm.ow2.org/license.html
@@ -14,12 +17,12 @@
# Please fill the missing licenses for dependencies :
#
#
-#Mon Jul 04 23:33:53 CEST 2011
-antlr--antlr--2.7.6--jar=3DBSD License
-asm--asm--3.1--jar=3Dhttp\://asm.ow2.org/license.html
-asm--asm-commons--3.1--jar=3Dhttp\://asm.ow2.org/license.html
-asm--asm-tree--3.1--jar=3Dhttp\://asm.ow2.org/license.html
-commons-primitives--commons-primitives--1.0--jar=3DThe Apache Software Licen=
se, Version 2.0
-dom4j--dom4j--1.6.1--jar=3DBSD License
-javax.transaction--jta--1.1--jar=3DCOMMON DEVELOPMENT AND DISTRIBUTION LICEN=
SE (CDDL) Version 1.0
-ognl--ognl--3.0.1--jar=3DThe Apache Software License, Version 2.0
+#Thu Aug 18 07:24:14 CEST 2011
+antlr--antlr--2.7.6=3DBSD License
+asm--asm--3.1=3Dhttp\://asm.ow2.org/license.html
+asm--asm-commons--3.1=3Dhttp\://asm.ow2.org/license.html
+asm--asm-tree--3.1=3Dhttp\://asm.ow2.org/license.html
+commons-primitives--commons-primitives--1.0=3DThe Apache Software License, V=
ersion 2.0
+dom4j--dom4j--1.6.1=3DBSD License
+javax.transaction--jta--1.1=3DCOMMON DEVELOPMENT AND DISTRIBUTION LICENSE (C=
DDL) Version 1.0
+ognl--ognl--3.0.1=3DThe Apache Software License, Version 2.0
Modified: trunk/nuiton-tapestry/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-tapestry/src/license/THIRD-PARTY.properties 2011-08-16 23:12=
:03 UTC (rev 108)
+++ trunk/nuiton-tapestry/src/license/THIRD-PARTY.properties 2011-08-18 05:25=
:27 UTC (rev 109)
@@ -1,10 +1,13 @@
-# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#---------------------------------------------------------------------------=
----
# Already used licenses in project :
# - Apache Software License 2.0
# - BSD License
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
-# - LGPL 2.1
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
# - MIT License
# - MPL 1.1
# - The Apache Software License, Version 2.0
@@ -12,5 +15,5 @@
# Please fill the missing licenses for dependencies :
#
#
-#Wed Jan 26 16:04:35 CET 2011
-org.antlr--antlr-runtime--3.1.1--jar=3DBSD License
+#Thu Aug 18 07:24:15 CEST 2011
+org.antlr--antlr-runtime--3.1.1=3DBSD License
Modified: 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 2011-08-16 23:12:03 U=
TC (rev 108)
+++ trunk/nuiton-web/src/license/THIRD-PARTY.properties 2011-08-18 05:25:27 U=
TC (rev 109)
@@ -1,4 +1,4 @@
-# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#---------------------------------------------------------------------------=
----
# Already used licenses in project :
# - Apache Software License - Version 2.0
@@ -6,11 +6,15 @@
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Eclipse Public License - Version 1.0
# - GNU Lesser General Public License version 2.1
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
# - 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
+#Thu Aug 18 07:24:12 CEST 2011
+javax.servlet--servlet-api--2.5=3DSun Microsystems, Inc. Binary Code License=
Agreement for the JDK 5.0
--===============2983161089513222889==--
From tchemit@users.nuiton.org Fri Aug 19 18:29:24 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r110 - trunk
Date: Fri, 19 Aug 2011 18:29:24 +0200
Message-ID: <20110819162924.26EA3158B0@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1740493034648172985=="
--===============1740493034648172985==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-08-19 18:29:24 +0200 (Fri, 19 Aug 2011)
New Revision: 110
Url: http://nuiton.org/repositories/revision/nuiton-web/110
Log:
Update mavenpom4redmineAndCentral to 3.0.2.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-18 05:25:27 UTC (rev 109)
+++ trunk/pom.xml 2011-08-19 16:29:24 UTC (rev 110)
@@ -10,7 +10,7 @@
org.nuitonmavenpom4redmineAndCentral
- 3.0.1
+ 3.0.2org.nuiton.web
--===============1740493034648172985==--
From tchemit@users.nuiton.org Tue Aug 23 15:02:30 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r111 -
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2
Date: Tue, 23 Aug 2011 15:02:30 +0200
Message-ID: <20110823130230.E0A0F158B4@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0604454078614587142=="
--===============0604454078614587142==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-08-23 15:02:30 +0200 (Tue, 23 Aug 2011)
New Revision: 111
Url: http://nuiton.org/repositories/revision/nuiton-web/111
Log:
remove unused i18n method
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/BaseAction.java
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/BaseActio=
n.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-struts2/src/main/java/org/nuiton/web/struts2/BaseAction.java=
2011-08-19 16:29:24 UTC (rev 110)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/BaseAction.java=
2011-08-23 13:02:30 UTC (rev 111)
@@ -37,12 +37,7 @@
public class BaseAction extends ActionSupport {
=20
private static final long serialVersionUID =3D 1L;
-
- public String _(String aTextName) {
- String value =3D getText(aTextName);
- return value;
- }
-
+ =20
public String _(String key, Object... args) {
String value =3D getText(key, Arrays.asList(args));
return value;
--===============0604454078614587142==--
From maven-release@users.nuiton.org Fri Sep 9 17:50:54 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r112 - trunk
Date: Fri, 09 Sep 2011 17:50:54 +0200
Message-ID: <20110909155054.72D9C158B4@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1956802680224701662=="
--===============1956802680224701662==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: maven-release
Date: 2011-09-09 17:50:54 +0200 (Fri, 09 Sep 2011)
New Revision: 112
Url: http://nuiton.org/repositories/revision/nuiton-web/112
Log:
Update mavenpom4redmineAndCentral to 3.0.3.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-23 13:02:30 UTC (rev 111)
+++ trunk/pom.xml 2011-09-09 15:50:54 UTC (rev 112)
@@ -10,7 +10,7 @@
org.nuitonmavenpom4redmineAndCentral
- 3.0.2
+ 3.0.3org.nuiton.web
--===============1956802680224701662==--
From tchemit@users.nuiton.org Fri Sep 9 18:05:23 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r113 - trunk
Date: Fri, 09 Sep 2011 18:05:23 +0200
Message-ID: <20110909160523.56BCE1589E@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8841218627500584547=="
--===============8841218627500584547==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-09-09 18:05:23 +0200 (Fri, 09 Sep 2011)
New Revision: 113
Url: http://nuiton.org/repositories/revision/nuiton-web/113
Log:
use new site deployment configuration
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-09-09 15:50:54 UTC (rev 112)
+++ trunk/pom.xml 2011-09-09 16:05:23 UTC (rev 113)
@@ -246,13 +246,6 @@
-
-
- ${site.server}
- ${our.site.repository}/${projectId}
-
-
-
@@ -309,4 +302,11 @@
http://www.nuiton.org/repositories/browse/nuiton-web/trunk
+
+
+ ${platform}
+ ${our.site.repository}/${projectId}
+
+
+
--===============8841218627500584547==--
From echatellier@users.nuiton.org Sun Sep 11 16:07:56 2011
From: echatellier@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r114 - trunk/nuiton-web/src/site/apt
Date: Sun, 11 Sep 2011 16:07:56 +0200
Message-ID: <20110911140756.B74E715A11@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6184240268443796815=="
--===============6184240268443796815==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: echatellier
Date: 2011-09-11 16:07:56 +0200 (Sun, 11 Sep 2011)
New Revision: 114
Url: http://nuiton.org/repositories/revision/nuiton-web/114
Log:
Update war launcher doc
Modified:
trunk/nuiton-web/src/site/apt/Warlauncher.apt
Modified: 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 2011-09-09 16:05:23 UTC (re=
v 113)
+++ trunk/nuiton-web/src/site/apt/Warlauncher.apt 2011-09-11 14:07:56 UTC (re=
v 114)
@@ -5,7 +5,7 @@
~~ $Id$
~~ $HeadURL$
~~ %%
-~~ Copyright (C) 2011 CodeLutin
+~~ Copyright (C) 2011 CodeLutin, Chatellier Eric
~~ %%
~~ 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
@@ -48,7 +48,7 @@
If <<>> content can be read into <<>> file,
it's used as server name (currently in systray tooltip).
=20
-* Use Winstone war launcher
+* Jetty based
=20
** Maven configuration
=20
@@ -56,17 +56,23 @@
=20
------------------------------------------------
- org.nuiton
- nuiton-utils
- 1.3
+ org.nuiton.web
+ nuiton-web
+ 1.4provided
- org.jvnet.hudson.winstone
- winstone
- 0.9.10-hudson-16
+ org.mortbay.jetty
+ jetty-runner
+ 8.0.1.v20110908provided
+
+ javax.servlet
+ servlet-api
+ 2.5
+ provided
+
------------------------------------------------
=20
They have to be both at least in <<>> scope.
@@ -76,25 +82,25 @@
--------------------------------------------------------------------
maven-war-plugin
- 2.1-beta-1
+ 2.1.1
- org.nuiton.util.war.WinstoneLauncher
+ org.nuiton.web.war.JettyLauncher
- org.nuiton
- nuiton-utils
+ org.nuiton.web
+ nuiton-webjar
- **/war/Winstone*
+ **/war/Jetty* =20
- org.jvnet.hudson.winstone
- winstone
+ org.mortbay.jetty
+ jetty-runnerjar
@@ -102,37 +108,25 @@
--------------------------------------------------------------------
=20
-** References
+* Use Winstone war launcher
=20
- * Winstone home : {{http://winstone.sourceforge.net}}
-
- * Winstone command line options : {{http://winstone.sourceforge.net/#comma=
ndLine}}
-
-* Jetty based
-
** Maven configuration
=20
Add following dependencies to your project.
=20
------------------------------------------------
- org.nuiton
- nuiton-utils
- 1.3
+ org.nuiton.web
+ nuiton-web
+ 1.4provided
- org.eclipse.jetty.aggregate
- jetty-webapp
- 7.1.0.v20100505
+ org.jvnet.hudson.winstone
+ winstone
+ 0.9.10-hudson-24provided
-
- javax.servlet
- servlet-api
- 2.5
- provided
-
------------------------------------------------
=20
They have to be both at least in <<>> scope.
@@ -142,33 +136,34 @@
--------------------------------------------------------------------
maven-war-plugin
- 2.1-beta-1
+ 2.1.1
- org.nuiton.util.war.JettyLauncher
+ org.nuiton.web.war.WinstoneLauncher
- org.nuiton
- nuiton-utils
+ org.nuiton.web
+ nuiton-webjar
- **/war/Jetty*
+ **/war/Winstone* =20
- org.eclipse.jetty.aggregate
- jetty-webapp
+ org.jvnet.hudson.winstone
+ winstonejar
-
- javax.servlet
- servlet-api
- jar
-
--------------------------------------------------------------------
+
+** References
+
+ * Winstone home : {{http://winstone.sourceforge.net}}
+
+ * Winstone command line options : {{http://winstone.sourceforge.net/#comma=
ndLine}}
--===============6184240268443796815==--
From tchemit@users.nuiton.org Thu Sep 22 14:33:04 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject:
[Nuiton-web-commits] r115 - in trunk: . nuiton-web nuiton-web/src/site/apt
Date: Thu, 22 Sep 2011 14:33:04 +0200
Message-ID: <20110922123304.8CA6A158B6@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1810529294265112442=="
--===============1810529294265112442==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-09-22 14:33:04 +0200 (Thu, 22 Sep 2011)
New Revision: 115
Url: http://nuiton.org/repositories/revision/nuiton-web/115
Log:
T?\195?\162che #1750: Updates to Topia 2.6.2
T?\195?\162che #1749: Updates to struts 2.2.3.1
Evolution #1751: Updates war lanucher documentation
Added:
trunk/nuiton-web/src/site/apt/Warlauncher.apt.vm
Removed:
trunk/nuiton-web/src/site/apt/Warlauncher.apt
Modified:
trunk/nuiton-web/pom.xml
trunk/pom.xml
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-09-11 14:07:56 UTC (rev 114)
+++ trunk/nuiton-web/pom.xml 2011-09-22 12:33:04 UTC (rev 115)
@@ -47,8 +47,6 @@
=20
- jar
-
=20
Deleted: 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 2011-09-11 14:07:56 UTC (re=
v 114)
+++ trunk/nuiton-web/src/site/apt/Warlauncher.apt 2011-09-22 12:33:04 UTC (re=
v 115)
@@ -1,169 +0,0 @@
-~~~
-~~ #%L
-~~ Nuiton Web :: Nuiton Web
-~~=20
-~~ $Id$
-~~ $HeadURL$
-~~ %%
-~~ Copyright (C) 2011 CodeLutin, Chatellier Eric
-~~ %%
-~~ 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).
-
-* Jetty based
-
-** Maven configuration
-
- Add following dependencies to your project.
-
-------------------------------------------------
-
- org.nuiton.web
- nuiton-web
- 1.4
- provided
-
-
- org.mortbay.jetty
- jetty-runner
- 8.0.1.v20110908
- 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.1
-
-
-
- org.nuiton.web.war.JettyLauncher
-
-
-
-
- org.nuiton.web
- nuiton-web
- jar
-
- **/war/Jetty*
-
- =20
-
- org.mortbay.jetty
- jetty-runner
- jar
-
-
-
-
---------------------------------------------------------------------
-
-* Use Winstone war launcher
-
-** Maven configuration
-
- Add following dependencies to your project.
-
-------------------------------------------------
-
- org.nuiton.web
- nuiton-web
- 1.4
- provided
-
-
- org.jvnet.hudson.winstone
- winstone
- 0.9.10-hudson-24
- 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.1
-
-
-
- org.nuiton.web.war.WinstoneLauncher
-
-
-
-
- org.nuiton.web
- nuiton-web
- 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}}
Copied: trunk/nuiton-web/src/site/apt/Warlauncher.apt.vm (from rev 114, 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.vm =
(rev 0)
+++ trunk/nuiton-web/src/site/apt/Warlauncher.apt.vm 2011-09-22 12:33:04 UTC =
(rev 115)
@@ -0,0 +1,169 @@
+~~~
+~~ #%L
+~~ Nuiton Web :: Nuiton Web
+~~=20
+~~ $Id$
+~~ $HeadURL$
+~~ %%
+~~ Copyright (C) 2011 CodeLutin, Chatellier Eric
+~~ %%
+~~ 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).
+
+* Jetty based
+
+** Maven configuration
+
+ Add following dependencies to your project.
+
+------------------------------------------------
+
+ org.nuiton.web
+ nuiton-web
+ ${project.version}
+ provided
+
+
+ org.mortbay.jetty
+ jetty-runner
+ 8.0.1.v20110908
+ 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
+ ${warPluginVersion}
+
+
+
+ org.nuiton.web.war.JettyLauncher
+
+
+
+
+ org.nuiton.web
+ nuiton-web
+ jar
+
+ **/war/Jetty*
+
+ =20
+
+ org.mortbay.jetty
+ jetty-runner
+ jar
+
+
+
+
+--------------------------------------------------------------------
+
+* Use Winstone war launcher
+
+** Maven configuration
+
+ Add following dependencies to your project.
+
+------------------------------------------------
+
+ org.nuiton.web
+ nuiton-web
+ ${project.version}
+ provided
+
+
+ org.jvnet.hudson.winstone
+ winstone
+ 0.9.10-hudson-24
+ provided
+
+------------------------------------------------
+
+ They have to be both at least in <<>> scope.
+
+ Then, you need to add following configuration into maven-war-plugin :
+
+--------------------------------------------------------------------
+
+ maven-war-plugin
+ ${warPluginVersion}
+
+
+
+ org.nuiton.web.war.WinstoneLauncher
+
+
+
+
+ org.nuiton.web
+ nuiton-web
+ 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}}
Property changes on: trunk/nuiton-web/src/site/apt/Warlauncher.apt.vm
___________________________________________________________________
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-09-11 14:07:56 UTC (rev 114)
+++ trunk/pom.xml 2011-09-22 12:33:04 UTC (rev 115)
@@ -224,8 +224,7 @@
2.4.1
=20
${nuitonI18nVersion}
- 1.2
- 2.6.1
+ 2.6.2
=20
5.2.4
@@ -236,7 +235,7 @@
2.2.0
=20
- 2.2.3
+ 2.2.3.1
=20
en,fr
--===============1810529294265112442==--
From tchemit@users.nuiton.org Thu Sep 22 14:57:16 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r116 - in trunk: . nuiton-web/src/site/apt
Date: Thu, 22 Sep 2011 14:57:16 +0200
Message-ID: <20110922125716.46F7C15919@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3616283242160676727=="
--===============3616283242160676727==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-09-22 14:57:16 +0200 (Thu, 22 Sep 2011)
New Revision: 116
Url: http://nuiton.org/repositories/revision/nuiton-web/116
Log:
use properties to fill documentation by magic :)
Modified:
trunk/nuiton-web/src/site/apt/Warlauncher.apt.vm
trunk/pom.xml
Modified: trunk/nuiton-web/src/site/apt/Warlauncher.apt.vm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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.vm 2011-09-22 12:33:04 UTC =
(rev 115)
+++ trunk/nuiton-web/src/site/apt/Warlauncher.apt.vm 2011-09-22 12:57:16 UTC =
(rev 116)
@@ -64,13 +64,13 @@
org.mortbay.jettyjetty-runner
- 8.0.1.v20110908
+ ${jettyVersion}providedjavax.servletservlet-api
- 2.5
+ ${servletApiVersion}provided
------------------------------------------------
@@ -124,7 +124,7 @@
org.jvnet.hudson.winstonewinstone
- 0.9.10-hudson-24
+ ${windstoneVersion}provided
------------------------------------------------
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-09-22 12:33:04 UTC (rev 115)
+++ trunk/pom.xml 2011-09-22 12:57:16 UTC (rev 116)
@@ -34,13 +34,13 @@
org.jvnet.hudson.winstonewinstone
- 0.9.10-hudson-24
+ ${windstoneVersion}
=20
org.eclipse.jetty.aggregatejetty-webapp
- 7.1.0.v20100505
+ ${jettyVersion}
=20
@@ -104,7 +104,7 @@
javax.servletservlet-api
- 2.5
+ ${servletApiVersion}provided
=20
@@ -148,7 +148,7 @@
com.jgeppert.struts2.jquerystruts2-jquery-plugin
- 2.5.0
+ 3.1.0
=20
@@ -237,6 +237,10 @@
2.2.3.1
=20
+ 2.5
+ 8.0.1.v20110908
+ 0.9.10-hudson-24
+
en,fr
=20
--===============3616283242160676727==--
From maven-release@users.nuiton.org Thu Sep 22 15:20:34 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r117 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Thu, 22 Sep 2011 15:20:33 +0200
Message-ID: <20110922132033.F1BAB158B6@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2828789050651401111=="
--===============2828789050651401111==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: maven-release
Date: 2011-09-22 15:20:33 +0200 (Thu, 22 Sep 2011)
New Revision: 117
Url: http://nuiton.org/repositories/revision/nuiton-web/117
Log:
[maven-release-plugin] prepare release nuiton-web-parent-1.4
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-09-22 12:57:16 UTC (rev 116)
+++ trunk/nuiton-gwt/pom.xml 2011-09-22 13:20:33 UTC (rev 117)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.4-SNAPSHOT
+ 1.4
=20
nuiton-gwt
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-09-22 12:57:16 UTC (rev 116)
+++ trunk/nuiton-rss/pom.xml 2011-09-22 13:20:33 UTC (rev 117)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.4-SNAPSHOT
+ 1.4
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-09-22 12:57:16 UTC (rev 116)
+++ trunk/nuiton-struts2/pom.xml 2011-09-22 13:20:33 UTC (rev 117)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.4-SNAPSHOT
+ 1.4
=20
nuiton-struts2
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-09-22 12:57:16 UTC (rev 116)
+++ trunk/nuiton-tapestry/pom.xml 2011-09-22 13:20:33 UTC (rev 117)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.4-SNAPSHOT
+ 1.4
=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-09-22 12:57:16 UTC (rev 116)
+++ trunk/nuiton-web/pom.xml 2011-09-22 13:20:33 UTC (rev 117)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.4-SNAPSHOT
+ 1.4
=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-09-22 12:57:16 UTC (rev 116)
+++ trunk/pom.xml 2011-09-22 13:20:33 UTC (rev 117)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.4-SNAPSHOT
+ 1.4
=20
nuiton-web
@@ -298,11 +298,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-parent-1.4
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-parent-1.4
- http://www.nuiton.org/repositories/browse/nuiton-web/trunk
+ http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-parent-1.4
=20
--===============2828789050651401111==--
From maven-release@users.nuiton.org Thu Sep 22 15:20:35 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r118 - tags
Date: Thu, 22 Sep 2011 15:20:35 +0200
Message-ID: <20110922132035.8493715A18@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============9197191000311853637=="
--===============9197191000311853637==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: maven-release
Date: 2011-09-22 15:20:35 +0200 (Thu, 22 Sep 2011)
New Revision: 118
Url: http://nuiton.org/repositories/revision/nuiton-web/118
Log:
[maven-release-plugin] copy for tag nuiton-web-parent-1.4
Added:
tags/nuiton-web-parent-1.4/
--===============9197191000311853637==--
From maven-release@users.nuiton.org Thu Sep 22 15:20:36 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r119 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Thu, 22 Sep 2011 15:20:36 +0200
Message-ID: <20110922132036.4718515A19@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1608708944959499609=="
--===============1608708944959499609==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: maven-release
Date: 2011-09-22 15:20:36 +0200 (Thu, 22 Sep 2011)
New Revision: 119
Url: http://nuiton.org/repositories/revision/nuiton-web/119
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-09-22 13:20:35 UTC (rev 118)
+++ trunk/nuiton-gwt/pom.xml 2011-09-22 13:20:36 UTC (rev 119)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.4
+ 1.5-SNAPSHOT
=20
nuiton-gwt
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-09-22 13:20:35 UTC (rev 118)
+++ trunk/nuiton-rss/pom.xml 2011-09-22 13:20:36 UTC (rev 119)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.4
+ 1.5-SNAPSHOT
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-09-22 13:20:35 UTC (rev 118)
+++ trunk/nuiton-struts2/pom.xml 2011-09-22 13:20:36 UTC (rev 119)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.4
+ 1.5-SNAPSHOT
=20
nuiton-struts2
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-09-22 13:20:35 UTC (rev 118)
+++ trunk/nuiton-tapestry/pom.xml 2011-09-22 13:20:36 UTC (rev 119)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.4
+ 1.5-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-09-22 13:20:35 UTC (rev 118)
+++ trunk/nuiton-web/pom.xml 2011-09-22 13:20:36 UTC (rev 119)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.4
+ 1.5-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-09-22 13:20:35 UTC (rev 118)
+++ trunk/pom.xml 2011-09-22 13:20:36 UTC (rev 119)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.4
+ 1.5-SNAPSHOT
=20
nuiton-web
@@ -298,11 +298,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-parent-1.4
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-parent-1.4
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-parent-1.4
+ http://www.nuiton.org/repositories/browse/nuiton-web/trunk
=20
--===============1608708944959499609==--
From maven-release@users.nuiton.org Thu Sep 22 19:27:59 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r120 - trunk
Date: Thu, 22 Sep 2011 19:27:59 +0200
Message-ID: <20110922172759.C85EC15A13@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0215970213787584485=="
--===============0215970213787584485==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: maven-release
Date: 2011-09-22 19:27:59 +0200 (Thu, 22 Sep 2011)
New Revision: 120
Url: http://nuiton.org/repositories/revision/nuiton-web/120
Log:
Update mavenpom4redmineAndCentral to 3.0.4.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-09-22 13:20:36 UTC (rev 119)
+++ trunk/pom.xml 2011-09-22 17:27:59 UTC (rev 120)
@@ -10,7 +10,7 @@
org.nuitonmavenpom4redmineAndCentral
- 3.0.3
+ 3.0.4org.nuiton.web
--===============0215970213787584485==--
From bleny@users.nuiton.org Fri Oct 28 18:00:53 2011
From: bleny@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r121 - in trunk/nuiton-struts2: .
src/main/java/org/nuiton/web/struts2
src/main/java/org/nuiton/web/struts2/filter
src/main/java/org/nuiton/web/struts2/interceptor
Date: Fri, 28 Oct 2011 18:00:53 +0200
Message-ID: <20111028160053.395A11590E@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============7313066768420904824=="
--===============7313066768420904824==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: bleny
Date: 2011-10-28 18:00:53 +0200 (Fri, 28 Oct 2011)
New Revision: 121
Url: http://nuiton.org/repositories/revision/nuiton-web/121
Log:
#1789, #1790, #1791, introduce CloseTopiaTransactionFilter and OpenTopiaTrans=
actionInterceptor, deprecate TopiaTransactionInterceptor
Added:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/filter/
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/filter/CloseTopi=
aTransactionFilter.java
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Open=
TopiaTransactionInterceptor.java
Modified:
trunk/nuiton-struts2/pom.xml
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Topi=
aTransactionInterceptor.java
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-09-22 17:27:59 UTC (rev 120)
+++ trunk/nuiton-struts2/pom.xml 2011-10-28 16:00:53 UTC (rev 121)
@@ -20,10 +20,10 @@
=20
=20
-
+
=20
org.apache.struts.xwork
@@ -51,6 +51,11 @@
=20
+ javax.servlet
+ servlet-api
+
+
+ junitjunit
Added: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/filter/Close=
TopiaTransactionFilter.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-struts2/src/main/java/org/nuiton/web/struts2/filter/CloseTop=
iaTransactionFilter.java (rev 0)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/filter/CloseTop=
iaTransactionFilter.java 2011-10-28 16:00:53 UTC (rev 121)
@@ -0,0 +1,73 @@
+package org.nuiton.web.struts2.filter;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.TopiaRuntimeException;
+import org.nuiton.web.struts2.interceptor.OpenTopiaTransactionInterceptor;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import java.io.IOException;
+
+/** Close a TopiaTransaction instance stored in the servlet context.
+ *
+ * The main usage is to close a transaction opened by the
+ * {@link OpenTopiaTransactionInterceptor}. A convention is used to find it,
+ * the transaction attached to the request is found at key
+ * {@link OpenTopiaTransactionInterceptor#TOPIA_TRANSACTION_REQUEST_ATTRIBUT=
E}
+ *
+ * @since 1.5
+ * @author bleny
+ */
+public class CloseTopiaTransactionFilter implements Filter {
+
+ /** Logger. */
+ private static final Log log =3D LogFactory.getLog(CloseTopiaTransaction=
Filter.class);
+
+ @Override
+ public void doFilter(ServletRequest servletRequest, ServletResponse serv=
letResponse, FilterChain filterChain) throws IOException, ServletException {
+ try {
+ filterChain.doFilter(servletRequest, servletResponse);
+ } finally {
+ TopiaContext transaction =3D (TopiaContext)
+ servletRequest.getAttribute(
+ OpenTopiaTransactionInterceptor.TOPIA_TRANSACTIO=
N_REQUEST_ATTRIBUTE);
+
+ if (transaction =3D=3D null) {
+ if (log.isTraceEnabled()) {
+ log.trace("no transaction to close");
+ }
+ } else if (transaction.isClosed()) {
+ if (log.isTraceEnabled()) {
+ log.trace("transaction " + transaction + " is already cl=
osed");
+ }
+ } else {
+ if (log.isDebugEnabled()) {
+ log.debug("close transaction " + transaction);
+ }
+ try {
+ transaction.closeContext();
+ } catch (TopiaException e) {
+ throw new TopiaRuntimeException(e);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ // nothing to do
+ }
+
+ @Override
+ public void destroy() {
+ // nothing to do
+ }
+}
Added: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/=
OpenTopiaTransactionInterceptor.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-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Ope=
nTopiaTransactionInterceptor.java (rev 0)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Ope=
nTopiaTransactionInterceptor.java 2011-10-28 16:00:53 UTC (rev 121)
@@ -0,0 +1,235 @@
+package org.nuiton.web.struts2.interceptor;
+
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import com.opensymphony.xwork2.util.TextParseUtil;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.ServletActionContext;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.framework.TopiaTransactionAware;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ *
+ *
+ * The aim of this Interceptor is to manage a {@code transaction} all along
+ * a action which implements {@link TopiaTransactionAware} contract.
+ *
+ * Technicaly, the action will receive only a proxy of a transaction and a r=
eal
+ * transaction will only be created as soon as a method will be asked on it.
+ *
+ * The interceptor is abstract and let user to implement the way how to open=
a
+ * new transaction via the method {@link #beginTransaction()}.
+ *
+ * Note that the transaction pushed in the action can be limited using a list
+ * of methods to exclude on it. The list of methods to forbid can be customi=
zed
+ * using the interceptor parameter {@link #excludeMethods}.
+ *
+ * Note also that the transaction is not commited nor close=
d.
+ * If you want the transaction to be closed, you may use
+ * {@link org.nuiton.web.struts2.filter.CloseTopiaTransactionFilter} by addi=
ng
+ * it to your web.xml file.
+ *
+ * This interceptor, as it provides connection to database should be in the
+ * interceptor stack before any other interceptor requiring access to databa=
se.
+ * For example, it is a common behaviour to do such calls in a prepare metho=
d,
+ * so make sure to place this interceptor before the {@code prepare} interce=
ptor.
+ *
+ *
+ * Interceptor parameters:
+ *
+ *
+ *
+ *
+ *
excludeMethods (optional) - Customized method names separated by coma=
to
+ * forbid on the proxy of the transaction given to action. By default, if th=
is
+ * parameter is not filled, then we will use this one :
+ * {@link #DEFAULT_EXCLUDE_METHODS}.
+ *
+ *
+ *
+ *
+ * @author tchemit
+ * @since 1.5
+ */
+public abstract class OpenTopiaTransactionInterceptor extends AbstractInterc=
eptor {
+
+ /** To specify on your action that you never want any commit. */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ElementType.TYPE, ElementType.METHOD})
+ public @interface NoCommit {
+ }
+
+ /** Logger. */
+ private static final Log log =3D
+ LogFactory.getLog(OpenTopiaTransactionInterceptor.class);
+
+ private static final long serialVersionUID =3D 1L;
+
+ public static final String TOPIA_TRANSACTION_REQUEST_ATTRIBUTE =3D "topi=
aTransaction";
+
+ public static final String[] DEFAULT_EXCLUDE_METHODS =3D {
+ "beginTransaction",
+ "closeContext",
+ "clear"
+ };
+
+ /** names of methods to forbid access while using proxy. */
+ protected Set excludeMethods;
+
+ public Set getExcludeMethods() {
+ return excludeMethods;
+ }
+
+ public void setExcludeMethods(String excludeMethods) {
+ this.excludeMethods =3D
+ TextParseUtil.commaDelimitedStringToSet(excludeMethods);
+ }
+
+ /**
+ * Method to open a new transaction.
+ *
+ * @return the new freshly opened transaction
+ * @throws org.nuiton.topia.TopiaException if any problem while opening =
a new transaction
+ */
+ protected abstract TopiaContext beginTransaction() throws TopiaException;
+
+ @Override
+ public void init() {
+ super.init();
+
+ if (getExcludeMethods() =3D=3D null) {
+
+ // use default exclude methods
+ excludeMethods =3D new HashSet(
+ Arrays.asList(DEFAULT_EXCLUDE_METHODS)
+ );
+ }
+ }
+
+ /**
+ * @deprecated to be removed in the same time as TopiaTransactionInterce=
ptor
+ */
+ @Deprecated
+ protected void closeTransaction(TopiaContext transaction, Object action,
+ ActionInvocation invocation) throws Topia=
Exception {
+ // do nothing by contract
+ }
+
+ @Override
+ public String intercept(ActionInvocation invocation) throws Exception {
+
+ TopiaTransactionAware transactionAware =3D null;
+
+ Object action =3D invocation.getProxy().getAction();
+
+ if (action instanceof TopiaTransactionAware) {
+ transactionAware =3D (TopiaTransactionAware) action;
+ }
+
+ if (transactionAware =3D=3D null) {
+
+ // not a transaction aware action, direct skip this interceptor
+ return invocation.invoke();
+ }
+
+ // creates a proxy of a lazy transaction
+
+ TopiaTransactionProxyInvocationHandler proxyInvocationHandler =3D
+ new TopiaTransactionProxyInvocationHandler();
+
+ TopiaContext proxy =3D (TopiaContext) Proxy.newProxyInstance(
+ getClass().getClassLoader(),
+ new Class>[]{TopiaContext.class,
+ TopiaContextImplementor.class},
+ proxyInvocationHandler
+ );
+
+ // set the transaction in the action
+ transactionAware.setTransaction(proxy);
+
+ try {
+
+ return invocation.invoke();
+
+ } finally {
+
+ closeTransaction(proxyInvocationHandler.getTransaction(), action=
, invocation);
+
+ }
+ }
+
+ /**
+ * Handler of a proxy on a {@link TopiaContext}.
+ *
+ * @see #excludeMethods
+ */
+ public class TopiaTransactionProxyInvocationHandler implements Invocatio=
nHandler {
+
+ /** Target to use for the proxy. */
+ protected TopiaContext transaction;
+
+ public TopiaContext getTransaction() {
+ return transaction;
+ }
+
+ @Override
+ public Object invoke(Object proxy,
+ Method method,
+ Object[] args) throws Throwable {
+
+ String methodName =3D method.getName();
+
+ if (getExcludeMethods().contains(methodName)) {
+
+ // not authorized
+ throw new IllegalAccessException(
+ "Not allowed to access method " + methodName + " on =
" +
+ proxy);
+ }
+
+ if (transaction =3D=3D null) {
+
+ if (log.isTraceEnabled()) {
+ log.trace("transaction started due to a call to " + meth=
odName);
+ }
+
+ // first time transaction is required, create its
+ transaction =3D beginTransaction();
+
+ // push transaction in request to make it available for clos=
ing in
+ // CloseTopiaTransactionFilter
+ ServletActionContext.getRequest().setAttribute(
+ TOPIA_TRANSACTION_REQUEST_ATTRIBUTE, transaction);
+
+ if (log.isDebugEnabled()) {
+ log.debug("Open transaction " + transaction);
+ }
+ }
+
+ // can invoke the method on the transaction
+ try {
+ Object result =3D method.invoke(transaction, args);
+ return result;
+ } catch (Exception eee) {
+ if (log.isErrorEnabled()) {
+ log.error("Could not execute method " + method.getName()=
, eee);
+ }
+ throw eee;
+ }
+ }
+ }
+}
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/intercept=
or/TopiaTransactionInterceptor.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-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Top=
iaTransactionInterceptor.java 2011-09-22 17:27:59 UTC (rev 120)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/interceptor/Top=
iaTransactionInterceptor.java 2011-10-28 16:00:53 UTC (rev 121)
@@ -25,206 +25,56 @@
package org.nuiton.web.struts2.interceptor;
=20
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-import com.opensymphony.xwork2.util.TextParseUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaContextImplementor;
-import org.nuiton.topia.framework.TopiaTransactionAware;
=20
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
=20
=20
-/**
- *
- *
- * The aim of this Interceptor is to manage a {@code transaction} all along
- * a action which implements {@link TopiaTransactionAware}
- * contract.
- *
- * Technicaly, the action will receive only a proxy of a transaction and a r=
eal
- * transaction will only be created as soon as a method will be asked on it.
- *
- * The interceptor is abstract and let user to implement the way how to open=
a
- * new transaction via the method {@link #beginTransaction()}.
- *
- * Note that the transaction pushed in the action can be limited using a list
- * of methods to exclude on it. The list of methods to forbid can be customi=
zed
- * using the interceptor parameter {@link #excludeMethods}.
- *
- * Note also that the transaction is commited and closed after all stack of
- * interceptor consumed, this means that the transaction will still be opened
- * while rendering the result, this is a particular interesting thing to avo=
id
- * pre-loading of entities due to lazy strategy of hibernate for example.
- * With this mecanism you can feel free to just obtain the obtain from datab=
ase
- * via a DAO and then really load it in the rendering result.
- *
- * If you do not want any commit for a given action, just put on the class a=
commit
- *
- * This interceptor, as it provides connection to database should be in the
- * interceptor stack before any other interceptor requiring access to databa=
se.
- * For example, it is a common behaviour to do such calls in a prepare metho=
d,
- * so make sure to place this interceptor before the {@code prepare} interce=
ptor.
- *
- *
- * Interceptor parameters:
- *
- *
- *
- *
- *
excludeMethods (optional) - Customized method names separated by coma=
to
- * forbid on the proxy of the transaction given to action. By default, if th=
is
- * parameter is not filled, then we will use this one :
- * {@link #DEFAULT_EXCLUDE_METHODS}.
+ * This filter purpose is to inject in the request a transaction from
+ * {@link TopiaContext} and deal with the complete lifecycle of a topia
+ * transaction while a request.
+ *
+ * The injected transaction will be closed (if was really opened) at the end=
of
+ * the request.
+ *
Configuration of the filter
+ * The filter accepts two configuration parameters:
+ *
+ *
{@code excludeMethods}: This parameters configure a set of method nam=
es
+ * which should never be called on the proxied transaction.
+ * When a such method is called on the transaction then the filter will pass=
in
+ * the hook {@link #onExcludeMethod(Object, Method, Object[])}.
+ *
+ * Default implementation of this hook is to throw an exception.
+ *
+ *
{@code unusedMethods}: This parameters configure a set of method names
+ * which should be by-pass when the proxied transaction was not still open (=
via a {@link TopiaContext#beginTransaction()}.
+ * When a such method is called on the transaction then the filter will pass=
in
+ * the hook {@link #onUnusedMethod(Object, Method, Object[])}.
+ *
+ * Default implementation of this hook is to not return null values.
+ *
+ *
+ *
Obtain the transaction
+ * The (proxied) transaction is pushed as an attribute in the servlet reques=
t.
+ *
+ * The attribute name is {@link #TOPIA_TRANSACTION_REQUEST_ATTRIBUTE}.
+ *
+ * A convience method is created here to obtain the transaction {@link #get=
Transaction(ServletRequest)} :
+ *
+ *
+ * @author tchemit
+ * @since 1.6
+ */
+public abstract class TopiaTransactionFilter implements Filter {
+
+ public static final String TOPIA_TRANSACTION_REQUEST_ATTRIBUTE =3D
+ "topiaTransaction";
+
+ public static final String[] DEFAULT_EXCLUDE_METHODS =3D {
+ "beginTransaction",
+ "closeContext",
+ "clear"
+ };
+
+ public static final String[] DEFAULT_UNUSED_METHODS =3D {
+ "toString",
+ "isClosed",
+ "closeContext",
+ "clear",
+ "equals",
+ "hashCode",
+ "finalize",
+ "getClass"
+ };
+
+ /** Logger. */
+ private static final Log log =3D
+ LogFactory.getLog(TopiaTransactionFilter.class);
+
+ /** names of methods to forbid access while using proxy. */
+ protected Set excludeMethods;
+
+ /** names of methods to by-pass if no transaction opened on proxy. */
+ protected Set unusedMethods;
+
+ public Set getExcludeMethods() {
+ return excludeMethods;
+ }
+
+ public Set getUnusedMethods() {
+ return unusedMethods;
+ }
+
+ public static TopiaContext getTransaction(ServletRequest request) {
+ TopiaContext topiaContext =3D (TopiaContext)
+ request.getAttribute(TOPIA_TRANSACTION_REQUEST_ATTRIBUTE);
+ return topiaContext;
+ }
+
+ /**
+ * Method to open a new transaction.
+ *
+ * @return the new freshly opened transaction
+ * @throws TopiaRuntimeException if any problem while opening a new tran=
saction
+ */
+ protected abstract TopiaContext beginTransaction() throws TopiaRuntimeEx=
ception;
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ String methodsFromConfig;
+
+ methodsFromConfig =3D filterConfig.getInitParameter("execludeMethods=
");
+
+ String[] methods;
+ if (StringUtils.isNotEmpty(methodsFromConfig)) {
+ methods =3D methodsFromConfig.split(",");
+ } else {
+ methods =3D DEFAULT_EXCLUDE_METHODS;
+ }
+ excludeMethods =3D new HashSet(Arrays.asList(methods));
+
+ methodsFromConfig =3D
+ filterConfig.getInitParameter("unusedMethods ");
+
+ if (StringUtils.isNotEmpty(methodsFromConfig)) {
+ methods =3D methodsFromConfig.split(",");
+ } else {
+ methods =3D DEFAULT_UNUSED_METHODS;
+ }
+ unusedMethods =3D new HashSet(Arrays.asList(methods));
+ }
+
+ @Override
+ public void doFilter(ServletRequest request,
+ ServletResponse response,
+ FilterChain chain) throws IOException, ServletExcep=
tion {
+
+ // creates a proxy of a lazy transaction
+
+ TopiaTransactionProxyInvocationHandler proxyInvocationHandler =3D
+ new TopiaTransactionProxyInvocationHandler();
+
+ TopiaContext proxy =3D (TopiaContext) Proxy.newProxyInstance(
+ getClass().getClassLoader(),
+ new Class>[]{TopiaContext.class,
+ TopiaContextImplementor.class},
+ proxyInvocationHandler
+ );
+ request.setAttribute(TOPIA_TRANSACTION_REQUEST_ATTRIBUTE, proxy);
+ try {
+ chain.doFilter(request, response);
+ } finally {
+ proxyInvocationHandler.closeTransaction();
+ }
+ }
+
+ /**
+ * Hook method called when a method with his name in
+ * {@link #excludeMethods} was invoked on the proxied transaction.
+ *
+ * @param proxy proxied transaction
+ * @param method method invoked
+ * @param args arguments of the invoked method
+ * @return the return code of the method
+ * @throws Throwable if any error to do.
+ */
+ protected Object onExcludeMethod(Object proxy,
+ Method method,
+ Object[] args) throws Throwable {
+
+ // not authorized
+ throw new IllegalAccessException(
+ "Not allowed to access method " + method.getName() + " on " +
+ proxy);
+ }
+
+ /**
+ * Hook method called when a method with his name in
+ * {@link #unusedMethods} was invoked on the proxied transaction
+ * while the underlying transaction is still not opened.
+ *
+ * @param proxy proxied transaction
+ * @param method method invoked
+ * @param args arguments of the invoked method
+ * @return the return code of the method
+ * @throws Throwable if any error to do.
+ */
+ protected Object onUnusedMethod(Object proxy,
+ Method method,
+ Object[] args) throws Throwable {
+
+ // by-pass method since no transaction found
+
+ String methodName =3D method.getName();
+ if (log.isDebugEnabled()) {
+ log.debug("Skip execution of method " + methodName +
+ " since no transaction is instanciated.");
+ }
+
+ Set methods =3D getUnusedMethods();
+ if (methods.contains("toString")) {
+
+ return "No transaction opened for proxy " + proxy;
+ }
+
+ if (methods.contains("isClosed")) {
+
+ return false;
+ }
+
+ if (methods.contains("equals")) {
+
+ return false;
+ }
+
+ if (methods.contains("hashCode")) {
+
+ return 0;
+ }
+
+ if (methods.contains("getClass")) {
+
+ return TopiaContext.class;
+ }
+
+ return null;
+ }
+
+ /**
+ * Handler of a proxy on a {@link TopiaContext}.
+ *
+ * @see #excludeMethods
+ */
+ public class TopiaTransactionProxyInvocationHandler implements Invocatio=
nHandler {
+
+ /** Target to use for the proxy. */
+ protected TopiaContext transaction;
+
+ @Override
+ public Object invoke(Object proxy,
+ Method method,
+ Object[] args) throws Throwable {
+
+ String methodName =3D method.getName();
+
+ if (getExcludeMethods().contains(methodName)) {
+
+ Object result =3D onExcludeMethod(proxy, method, args);
+ return result;
+ }
+
+ if (transaction =3D=3D null) {
+
+ if (log.isTraceEnabled()) {
+ log.trace("transaction started due to a call to " + meth=
odName);
+ }
+
+ if (getUnusedMethods().contains(methodName)) {
+
+ Object result =3D onUnusedMethod(proxy, method, args);
+ return result;
+ }
+
+ // first time transaction is required, create its
+ transaction =3D beginTransaction();
+
+ if (log.isDebugEnabled()) {
+ log.debug("Open transaction " + transaction);
+ }
+ }
+
+ // can invoke the method on the transaction
+ try {
+ Object result =3D method.invoke(transaction, args);
+ return result;
+ } catch (Exception eee) {
+ if (log.isErrorEnabled()) {
+ log.error("Could not execute method " + method.getName()=
, eee);
+ }
+ throw eee;
+ }
+ }
+
+ protected void closeTransaction() {
+ if (transaction =3D=3D null) {
+ if (log.isTraceEnabled()) {
+ log.trace("no transaction to close");
+ }
+ } else if (transaction.isClosed()) {
+ if (log.isTraceEnabled()) {
+ log.trace("transaction " + transaction + " is already cl=
osed");
+ }
+ } else {
+ if (log.isDebugEnabled()) {
+ log.debug("closing transaction " + transaction);
+ }
+ try {
+ transaction.closeContext();
+ } catch (TopiaException e) {
+ throw new TopiaRuntimeException(e);
+ }
+ }
+ }
+ }
+
+}
Property changes on: trunk/nuiton-web/src/main/java/org/nuiton/web/filter/Top=
iaTransactionFilter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
--===============4854662129845175151==--
From tchemit@users.nuiton.org Sun Nov 13 16:34:52 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r133 - in trunk/nuiton-web/src/site: . apt
Date: Sun, 13 Nov 2011 16:34:52 +0100
Message-ID: <20111113153452.9DAB2158B3@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2890166835376405134=="
--===============2890166835376405134==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-11-13 16:34:52 +0100 (Sun, 13 Nov 2011)
New Revision: 133
Url: http://nuiton.org/repositories/revision/nuiton-web/133
Log:
add documentation for TopiaFilter
Added:
trunk/nuiton-web/src/site/apt/TopiaFilter.apt.vm
Modified:
trunk/nuiton-web/src/site/site_fr.xml
Added: trunk/nuiton-web/src/site/apt/TopiaFilter.apt.vm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/TopiaFilter.apt.vm =
(rev 0)
+++ trunk/nuiton-web/src/site/apt/TopiaFilter.apt.vm 2011-11-13 15:34:52 UTC =
(rev 133)
@@ -0,0 +1,72 @@
+
+Topia Filter
+
+* Abstract
+
+ The topia filter permits to manage the topia transaction inside a http ser=
vlet
+ request.
+
+* Usage
+
+ * Implements the abstract filter.
+
+------------------------------------------------
+package fr.ifremer.echobase.ui;
+
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.TopiaRuntimeException;
+import org.nuiton.web.filter.TopiaTransactionFilter;
+
+/**
+ * EchoBase implementation of the {@link TopiaTransactionFilter}.
+ *
+ * @author tchemit
+ * @since 0.1
+ */
+public class EchoBaseTopiaTransactionFilter extends TopiaTransactionFilter {
+
+ @Override
+ protected TopiaContext beginTransaction() throws TopiaRuntimeException {
+
+ TopiaContext rootContext =3D ... // obtain your root context;
+ TopiaContext transaction =3D null;
+ try {
+ transaction =3D rootContext.beginTransaction();
+ } catch (TopiaException eee) {
+ throw new TopiaRuntimeException("Could not start transaction", e=
ee);
+ }
+ return transaction;
+ }
+}
+------------------------------------------------
+
+ * Adds it in our <> :
+
+------------------------------------------------
+
+
+ topiaTransaction
+ fr.ifremer.echobase.ui.EchoBaseTopiaTransactionFilter
+
+
+...
+
+
+ topiaTransaction
+ /*
+
+
+
+------------------------------------------------
+
+ * Obtain transaction from the http requeststored in the attribute name giv=
en
+ by <>.
+ There is also a usefull method to obtain it from TopiaTransactionFilter :
+
+------------------------------------------------
+
+ HttpServletRequest request =3D ...;
+ transaction =3D TopiaTransactionFilter.getTransaction(request);
+
+------------------------------------------------
\ No newline at end of file
Property changes on: trunk/nuiton-web/src/site/apt/TopiaFilter.apt.vm
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: 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 2011-11-09 15:54:16 UTC (rev 132)
+++ trunk/nuiton-web/src/site/site_fr.xml 2011-11-13 15:34:52 UTC (rev 133)
@@ -41,6 +41,7 @@
=20
+
=20
--===============2890166835376405134==--
From tchemit@users.nuiton.org Sun Nov 13 16:46:48 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r134 - in trunk: nuiton-struts2
nuiton-struts2/src/main/java/org/nuiton/web/struts2 nuiton-tapestry
nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins nuiton-web
nuiton-web/src/main/java/org/nuiton/web/filter
Date: Sun, 13 Nov 2011 16:46:48 +0100
Message-ID: <20111113154648.94F2F158B3@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5844248285225879844=="
--===============5844248285225879844==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-11-13 16:46:48 +0100 (Sun, 13 Nov 2011)
New Revision: 134
Url: http://nuiton.org/repositories/revision/nuiton-web/134
Log:
Evolution #1803: Pass org.apache.commons.lang3 after commons-lang
Modified:
trunk/nuiton-struts2/pom.xml
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvider=
.java
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneUp=
dater.java
trunk/nuiton-web/pom.xml
trunk/nuiton-web/src/main/java/org/nuiton/web/filter/TopiaTransactionFilte=
r.java
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-11-13 15:34:52 UTC (rev 133)
+++ trunk/nuiton-struts2/pom.xml 2011-11-13 15:46:48 UTC (rev 134)
@@ -41,8 +41,8 @@
=20
- commons-lang
- commons-lang
+ org.apache.commons
+ commons-lang3
=20
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextP=
rovider.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-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvide=
r.java 2011-11-13 15:34:52 UTC (rev 133)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/I18nTextProvide=
r.java 2011-11-13 15:46:48 UTC (rev 134)
@@ -27,7 +27,7 @@
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.ResourceBundleTextProvider;
import com.opensymphony.xwork2.util.ValueStack;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.i18n.I18n;
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-11-13 15:34:52 UTC (rev 133)
+++ trunk/nuiton-tapestry/pom.xml 2011-11-13 15:46:48 UTC (rev 134)
@@ -18,8 +18,8 @@
=20
- commons-lang
- commons-lang
+ org.apache.commons
+ commons-lang3
=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/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneU=
pdater.java 2011-11-13 15:34:52 UTC (rev 133)
+++ trunk/nuiton-tapestry/src/main/java/org/nuiton/web/tapestry5/mixins/ZoneU=
pdater.java 2011-11-13 15:46:48 UTC (rev 134)
@@ -44,7 +44,7 @@
*/
package org.nuiton.web.tapestry5.mixins;
=20
-import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang3.ArrayUtils;
import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.ClientElement;
import org.apache.tapestry5.ComponentResources;
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-11-13 15:34:52 UTC (rev 133)
+++ trunk/nuiton-web/pom.xml 2011-11-13 15:46:48 UTC (rev 134)
@@ -38,6 +38,16 @@
provided
=20
+
+ org.apache.commons
+ commons-lang3
+
+
+
+ commons-logging
+ commons-logging
+
+
=20
=20
Modified: trunk/nuiton-web/src/main/java/org/nuiton/web/filter/TopiaTransacti=
onFilter.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/filter/TopiaTransactionFilt=
er.java 2011-11-13 15:34:52 UTC (rev 133)
+++ trunk/nuiton-web/src/main/java/org/nuiton/web/filter/TopiaTransactionFilt=
er.java 2011-11-13 15:46:48 UTC (rev 134)
@@ -24,7 +24,7 @@
*/
package org.nuiton.web.filter;
=20
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nuiton.topia.TopiaContext;
--===============5844248285225879844==--
From maven-release@users.nuiton.org Sun Nov 13 16:47:51 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r135 - in trunk: nuiton-struts2 nuiton-tapestry
nuiton-web
Date: Sun, 13 Nov 2011 16:47:51 +0100
Message-ID: <20111113154751.AAFF915989@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8801204481817116271=="
--===============8801204481817116271==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: maven-release
Date: 2011-11-13 16:47:51 +0100 (Sun, 13 Nov 2011)
New Revision: 135
Url: http://nuiton.org/repositories/revision/nuiton-web/135
Log:
[maven-release-plugin] rollback the release of nuiton-web-parent-1.6
Modified:
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
Modified: trunk/nuiton-struts2/pom.xml
===================================================================
--- trunk/nuiton-struts2/pom.xml 2011-11-13 15:46:48 UTC (rev 134)
+++ trunk/nuiton-struts2/pom.xml 2011-11-13 15:47:51 UTC (rev 135)
@@ -41,8 +41,8 @@
- org.apache.commons
- commons-lang3
+ commons-lang
+ commons-lang
Modified: trunk/nuiton-tapestry/pom.xml
===================================================================
--- trunk/nuiton-tapestry/pom.xml 2011-11-13 15:46:48 UTC (rev 134)
+++ trunk/nuiton-tapestry/pom.xml 2011-11-13 15:47:51 UTC (rev 135)
@@ -18,8 +18,8 @@
- org.apache.commons
- commons-lang3
+ commons-lang
+ commons-lang
Modified: trunk/nuiton-web/pom.xml
===================================================================
--- trunk/nuiton-web/pom.xml 2011-11-13 15:46:48 UTC (rev 134)
+++ trunk/nuiton-web/pom.xml 2011-11-13 15:47:51 UTC (rev 135)
@@ -38,16 +38,6 @@
provided
-
- org.apache.commons
- commons-lang3
-
-
-
- commons-logging
- commons-logging
-
-
--===============8801204481817116271==--
From tchemit@users.nuiton.org Sun Nov 13 16:50:12 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r136 - trunk/nuiton-web/src/license
Date: Sun, 13 Nov 2011 16:50:12 +0100
Message-ID: <20111113155012.8D5EF158B7@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5955886274240493970=="
--===============5955886274240493970==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: tchemit
Date: 2011-11-13 16:50:12 +0100 (Sun, 13 Nov 2011)
New Revision: 136
Url: http://nuiton.org/repositories/revision/nuiton-web/136
Log:
optimize thrid-parties
Added:
trunk/nuiton-web/src/license/THIRD-PARTY.properties
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-11-13 15:50:12 U=
TC (rev 136)
@@ -0,0 +1,25 @@
+# Generated by org.codehaus.mojo.license.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
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
+# - MPL 1.1
+# - The Apache Software License, Version 2.0
+# - license.txt
+#---------------------------------------------------------------------------=
----
+# Please fill the missing licenses for dependencies :
+#
+#
+#Sun Nov 13 16:49:07 CET 2011
+antlr--antlr--2.7.6=3DBSD License
+commons-primitives--commons-primitives--1.0=3DThe Apache Software License, V=
ersion 2.0
+dom4j--dom4j--1.6.1=3DBSD License
+javax.transaction--jta--1.1=3DCOMMON DEVELOPMENT AND DISTRIBUTION LICENSE (C=
DDL) Version 1.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
--===============5955886274240493970==--
From tchemit@users.nuiton.org Sun Nov 13 16:59:36 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r137 - in trunk: nuiton-struts2 nuiton-tapestry
nuiton-web
Date: Sun, 13 Nov 2011 16:59:36 +0100
Message-ID: <20111113155936.4EDB0158B3@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3378825424680828172=="
--===============3378825424680828172==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-11-13 16:59:36 +0100 (Sun, 13 Nov 2011)
New Revision: 137
Url: http://nuiton.org/repositories/revision/nuiton-web/137
Log:
Evolution #1803: Pass org.apache.commons.lang3 after commons-lang !
Modified:
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
Modified: trunk/nuiton-struts2/pom.xml
===================================================================
--- trunk/nuiton-struts2/pom.xml 2011-11-13 15:50:12 UTC (rev 136)
+++ trunk/nuiton-struts2/pom.xml 2011-11-13 15:59:36 UTC (rev 137)
@@ -41,8 +41,8 @@
- commons-lang
- commons-lang
+ org.apache.commons
+ commons-lang3
Modified: trunk/nuiton-tapestry/pom.xml
===================================================================
--- trunk/nuiton-tapestry/pom.xml 2011-11-13 15:50:12 UTC (rev 136)
+++ trunk/nuiton-tapestry/pom.xml 2011-11-13 15:59:36 UTC (rev 137)
@@ -18,8 +18,8 @@
- commons-lang
- commons-lang
+ org.apache.commons
+ commons-lang3
Modified: trunk/nuiton-web/pom.xml
===================================================================
--- trunk/nuiton-web/pom.xml 2011-11-13 15:50:12 UTC (rev 136)
+++ trunk/nuiton-web/pom.xml 2011-11-13 15:59:36 UTC (rev 137)
@@ -38,6 +38,16 @@
provided
+
+ org.apache.commons
+ commons-lang3
+
+
+
+ commons-logging
+ commons-logging
+
+
--===============3378825424680828172==--
From tchemit@users.nuiton.org Sun Nov 13 17:23:35 2011
From: tchemit@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r138 - trunk
Date: Sun, 13 Nov 2011 17:23:35 +0100
Message-ID: <20111113162335.6A649158B7@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6024190823742374546=="
--===============6024190823742374546==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: tchemit
Date: 2011-11-13 17:23:35 +0100 (Sun, 13 Nov 2011)
New Revision: 138
Url: http://nuiton.org/repositories/revision/nuiton-web/138
Log:
T?\195?\162che #1805: Updates to topia 2.6.4
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-13 15:59:36 UTC (rev 137)
+++ trunk/pom.xml 2011-11-13 16:23:35 UTC (rev 138)
@@ -234,7 +234,7 @@
2.4.1${nuitonI18nVersion}
- 2.6.3
+ 2.6.45.2.4
--===============6024190823742374546==--
From maven-release@users.nuiton.org Sun Nov 13 17:30:16 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r139 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Sun, 13 Nov 2011 17:30:16 +0100
Message-ID: <20111113163016.58C0915971@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0050348096941850463=="
--===============0050348096941850463==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: maven-release
Date: 2011-11-13 17:30:16 +0100 (Sun, 13 Nov 2011)
New Revision: 139
Url: http://nuiton.org/repositories/revision/nuiton-web/139
Log:
[maven-release-plugin] prepare release nuiton-web-parent-1.6
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-11-13 16:23:35 UTC (rev 138)
+++ trunk/nuiton-gwt/pom.xml 2011-11-13 16:30:16 UTC (rev 139)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.6-SNAPSHOT
+ 1.6
=20
nuiton-gwt
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-11-13 16:23:35 UTC (rev 138)
+++ trunk/nuiton-rss/pom.xml 2011-11-13 16:30:16 UTC (rev 139)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.6-SNAPSHOT
+ 1.6
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-11-13 16:23:35 UTC (rev 138)
+++ trunk/nuiton-struts2/pom.xml 2011-11-13 16:30:16 UTC (rev 139)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.6-SNAPSHOT
+ 1.6
=20
nuiton-struts2
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-11-13 16:23:35 UTC (rev 138)
+++ trunk/nuiton-tapestry/pom.xml 2011-11-13 16:30:16 UTC (rev 139)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.6-SNAPSHOT
+ 1.6
=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-11-13 16:23:35 UTC (rev 138)
+++ trunk/nuiton-web/pom.xml 2011-11-13 16:30:16 UTC (rev 139)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.6-SNAPSHOT
+ 1.6
=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-11-13 16:23:35 UTC (rev 138)
+++ trunk/pom.xml 2011-11-13 16:30:16 UTC (rev 139)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.6-SNAPSHOT
+ 1.6
=20
nuiton-web
@@ -308,11 +308,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-parent-1.6
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-parent-1.6
- http://www.nuiton.org/repositories/browse/nuiton-web/trunk
+ http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-parent-1.6
=20
--===============0050348096941850463==--
From maven-release@users.nuiton.org Sun Nov 13 17:30:17 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r140 - tags
Date: Sun, 13 Nov 2011 17:30:17 +0100
Message-ID: <20111113163017.7C26A158B7@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5020078730806019703=="
--===============5020078730806019703==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: maven-release
Date: 2011-11-13 17:30:17 +0100 (Sun, 13 Nov 2011)
New Revision: 140
Url: http://nuiton.org/repositories/revision/nuiton-web/140
Log:
[maven-release-plugin] copy for tag nuiton-web-parent-1.6
Added:
tags/nuiton-web-parent-1.6/
--===============5020078730806019703==--
From maven-release@users.nuiton.org Sun Nov 13 17:30:18 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r141 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Sun, 13 Nov 2011 17:30:18 +0100
Message-ID: <20111113163018.2B62E15989@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1114575108063746419=="
--===============1114575108063746419==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: maven-release
Date: 2011-11-13 17:30:18 +0100 (Sun, 13 Nov 2011)
New Revision: 141
Url: http://nuiton.org/repositories/revision/nuiton-web/141
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-11-13 16:30:17 UTC (rev 140)
+++ trunk/nuiton-gwt/pom.xml 2011-11-13 16:30:18 UTC (rev 141)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.6
+ 1.7-SNAPSHOT
=20
nuiton-gwt
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-11-13 16:30:17 UTC (rev 140)
+++ trunk/nuiton-rss/pom.xml 2011-11-13 16:30:18 UTC (rev 141)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.6
+ 1.7-SNAPSHOT
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-11-13 16:30:17 UTC (rev 140)
+++ trunk/nuiton-struts2/pom.xml 2011-11-13 16:30:18 UTC (rev 141)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.6
+ 1.7-SNAPSHOT
=20
nuiton-struts2
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-11-13 16:30:17 UTC (rev 140)
+++ trunk/nuiton-tapestry/pom.xml 2011-11-13 16:30:18 UTC (rev 141)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.6
+ 1.7-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-11-13 16:30:17 UTC (rev 140)
+++ trunk/nuiton-web/pom.xml 2011-11-13 16:30:18 UTC (rev 141)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.6
+ 1.7-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-11-13 16:30:17 UTC (rev 140)
+++ trunk/pom.xml 2011-11-13 16:30:18 UTC (rev 141)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.6
+ 1.7-SNAPSHOT
=20
nuiton-web
@@ -308,11 +308,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-parent-1.6
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-parent-1.6
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-parent-1.6
+ http://www.nuiton.org/repositories/browse/nuiton-web/trunk
=20
--===============1114575108063746419==--
From bleny@users.nuiton.org Mon Nov 14 16:26:09 2011
From: bleny@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r142 - in trunk/nuiton-struts2: .
src/main/java/org/nuiton/web/struts2
src/main/java/org/nuiton/web/struts2/taglib src/main/resources
src/main/resources/META-INF src/main/resources/META-INF/tld
src/main/resources/template/css_xhtml
Date: Mon, 14 Nov 2011 16:26:09 +0100
Message-ID: <20111114152609.259D2158B3@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1221543114106701578=="
--===============1221543114106701578==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: bleny
Date: 2011-11-14 16:26:09 +0100 (Mon, 14 Nov 2011)
New Revision: 142
Url: http://nuiton.org/repositories/revision/nuiton-web/142
Log:
#1808 Add a nuiton struts taglib
. boilerplate code
Added:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean.=
java
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.j=
ava
trunk/nuiton-struts2/src/main/resources/META-INF/
trunk/nuiton-struts2/src/main/resources/META-INF/tld/
trunk/nuiton-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld
trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help-close.ftl
trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
Modified:
trunk/nuiton-struts2/pom.xml
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-11-13 16:30:18 UTC (rev 141)
+++ trunk/nuiton-struts2/pom.xml 2011-11-14 15:26:09 UTC (rev 142)
@@ -56,6 +56,11 @@
=20
+ javax.servlet.jsp
+ jsp-api
+
+
+ junitjunit
Added: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpB=
ean.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-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean=
.java (rev 0)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean=
.java 2011-11-14 15:26:09 UTC (rev 142)
@@ -0,0 +1,50 @@
+package org.nuiton.web.struts2.taglib;
+
+import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.struts2.components.ClosingUIBean;
+import org.apache.struts2.views.annotations.StrutsTag;
+import org.apache.struts2.views.annotations.StrutsTagAttribute;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@StrutsTag(
+ name=3D"help",
+ tldTagClass=3D"org.nuiton.web.struts2.taglib.HelpTag",
+ description=3D"TODO",
+ allowDynamicAttributes=3Dfalse)
+public class HelpBean extends ClosingUIBean {
+
+ protected static final String TEMPLATE =3D "help";
+
+ protected static final String TEMPLATE_CLOSE =3D "help-close";
+
+ public HelpBean(ValueStack stack, HttpServletRequest req, HttpServletRes=
ponse res) {
+ super(stack, req, res);
+ }
+
+ protected String helpKey;
+
+ @Override
+ public String getDefaultOpenTemplate() {
+ return TEMPLATE;
+ }
+
+ @Override
+ protected String getDefaultTemplate() {
+ return TEMPLATE_CLOSE;
+ }
+
+ @Override
+ protected void evaluateExtraParams() {
+ if (helpKey !=3D null) {
+ addParameter("helpKey", helpKey);
+ }
+
+ }
+
+ @StrutsTagAttribute(description=3D"TODO" ,required =3D true)
+ public void setHelpKey(String helpKey) {
+ this.helpKey =3D helpKey;
+ }
+}
Added: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpT=
ag.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-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java (rev 0)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java 2011-11-14 15:26:09 UTC (rev 142)
@@ -0,0 +1,31 @@
+package org.nuiton.web.struts2.taglib;
+
+import com.opensymphony.xwork2.util.ValueStack;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.views.jsp.ui.AbstractClosingTag;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class HelpTag extends AbstractClosingTag {
+
+ /** Logger. */
+ private static final Log log =3D LogFactory.getLog(HelpTag.class);
+
+ protected String helpKey;
+
+ public HelpBean getBean(ValueStack stack, HttpServletRequest req, HttpSe=
rvletResponse res) {
+ return new HelpBean(stack, req, res);
+ }
+
+ public void setHelpKey(String helpKey) {
+ this.helpKey =3D helpKey;
+ }
+
+ @Override
+ protected void populateParams() {
+ HelpBean helpBean =3D (HelpBean) component;
+ helpBean.setHelpKey(helpKey);
+ }
+}
Added: trunk/nuiton-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld =
(rev 0)
+++ trunk/nuiton-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld 2011=
-11-14 15:26:09 UTC (rev 142)
@@ -0,0 +1,25 @@
+
+
+
+ "Nuiton Struts Tags"
+ 2.2
+ ns
+ /nuiton-tags
+
+
+ help
+ org.nuiton.web.struts2.taglib.HelpTag
+ JSP
+
+
+ helpKey
+ true
+ true
+
+ false
+
+
Added: trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help-close.=
ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/css_xhtml/help-close.ftl=
(rev 0)
+++ trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help-close.ftl=
2011-11-14 15:26:09 UTC (rev 142)
@@ -0,0 +1 @@
+
\ No newline at end of file
Added: trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/css_xhtml/help.ftl =
(rev 0)
+++ trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl 2011-=
11-14 15:26:09 UTC (rev 142)
@@ -0,0 +1,13 @@
+
+
\ No newline at end of file
--===============1221543114106701578==--
From bleny@users.nuiton.org Mon Nov 14 16:29:07 2011
From: bleny@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r143 - trunk
Date: Mon, 14 Nov 2011 16:29:07 +0100
Message-ID: <20111114152907.86560158B7@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4804134133881348478=="
--===============4804134133881348478==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: bleny
Date: 2011-11-14 16:29:07 +0100 (Mon, 14 Nov 2011)
New Revision: 143
Url: http://nuiton.org/repositories/revision/nuiton-web/143
Log:
#1808 Add a nuiton struts taglib. forgotten parent pom
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-14 15:26:09 UTC (rev 142)
+++ trunk/pom.xml 2011-11-14 15:29:07 UTC (rev 143)
@@ -108,6 +108,13 @@
provided
+
+ javax.servlet.jsp
+ jsp-api
+ 2.2
+ provided
+
+
org.nuiton.i18n
--===============4804134133881348478==--
From bleny@users.nuiton.org Wed Nov 16 16:07:34 2011
From: bleny@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r144 - in trunk/nuiton-struts2/src/main:
java/org/nuiton/web/struts2/taglib resources/META-INF/tld
resources/template/css_xhtml
Date: Wed, 16 Nov 2011 16:07:34 +0100
Message-ID: <20111116150734.BD59F158B3@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4359480694083225211=="
--===============4359480694083225211==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: bleny
Date: 2011-11-16 16:07:34 +0100 (Wed, 16 Nov 2011)
New Revision: 144
Url: http://nuiton.org/repositories/revision/nuiton-web/144
Log:
#1808 Add a nuiton struts taglib. help tag has better support for some type o=
f fields
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean.=
java
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.j=
ava
trunk/nuiton-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld
trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/He=
lpBean.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-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean=
.java 2011-11-14 15:29:07 UTC (rev 143)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean=
.java 2011-11-16 15:07:34 UTC (rev 144)
@@ -11,7 +11,7 @@
@StrutsTag(
name=3D"help",
tldTagClass=3D"org.nuiton.web.struts2.taglib.HelpTag",
- description=3D"TODO",
+ description=3D"display an help message for the fields inside this tag",
allowDynamicAttributes=3Dfalse)
public class HelpBean extends ClosingUIBean {
=20
@@ -19,12 +19,16 @@
=20
protected static final String TEMPLATE_CLOSE =3D "help-close";
=20
+ protected static final String DEFAULT_HELP_ZONE =3D "helpZone";
+
+ protected String helpKey;
+
+ protected String helpZone;
+
public HelpBean(ValueStack stack, HttpServletRequest req, HttpServletRes=
ponse res) {
super(stack, req, res);
}
=20
- protected String helpKey;
-
@Override
public String getDefaultOpenTemplate() {
return TEMPLATE;
@@ -37,14 +41,17 @@
=20
@Override
protected void evaluateExtraParams() {
- if (helpKey !=3D null) {
- addParameter("helpKey", helpKey);
- }
-
+ addParameter("helpKey", helpKey);
+ addParameter("helpZone", helpZone =3D=3D null ? DEFAULT_HELP_ZONE : =
helpZone);
}
=20
- @StrutsTagAttribute(description=3D"TODO" ,required =3D true)
+ @StrutsTagAttribute(description=3D"the key used to get the help message =
body", required =3D true)
public void setHelpKey(String helpKey) {
this.helpKey =3D helpKey;
}
+
+ @StrutsTagAttribute(description=3D"the id of the element where the help =
message will be pushed")
+ public void setHelpZone(String helpZone) {
+ this.helpZone =3D helpZone;
+ }
}
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/He=
lpTag.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-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java 2011-11-14 15:29:07 UTC (rev 143)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java 2011-11-16 15:07:34 UTC (rev 144)
@@ -15,6 +15,8 @@
=20
protected String helpKey;
=20
+ protected String helpZone;
+
public HelpBean getBean(ValueStack stack, HttpServletRequest req, HttpSe=
rvletResponse res) {
return new HelpBean(stack, req, res);
}
@@ -23,9 +25,14 @@
this.helpKey =3D helpKey;
}
=20
+ public void setHelpZone(String helpZone) {
+ this.helpZone =3D helpZone;
+ }
+
@Override
protected void populateParams() {
HelpBean helpBean =3D (HelpBean) component;
helpBean.setHelpKey(helpKey);
+ helpBean.setHelpZone(helpZone);
}
}
Modified: trunk/nuiton-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld 2011=
-11-14 15:29:07 UTC (rev 143)
+++ trunk/nuiton-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld 2011=
-11-16 15:07:34 UTC (rev 144)
@@ -15,11 +15,17 @@
org.nuiton.web.struts2.taglib.HelpTagJSP
-
+ helpKeytruetrue
+
+
+ helpZone
+ false
+ true
+ false
Modified: trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/css_xhtml/help.ftl 2011-=
11-14 15:29:07 UTC (rev 143)
+++ trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl 2011-=
11-16 15:07:34 UTC (rev 144)
@@ -1,13 +1,40 @@
\ No newline at end of file
--===============4359480694083225211==--
From maven-release@users.nuiton.org Fri Nov 18 15:29:17 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r145 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Fri, 18 Nov 2011 15:29:17 +0100
Message-ID: <20111118142917.4D09215971@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4769449302658843871=="
--===============4769449302658843871==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: maven-release
Date: 2011-11-18 15:29:17 +0100 (Fri, 18 Nov 2011)
New Revision: 145
Url: http://nuiton.org/repositories/revision/nuiton-web/145
Log:
[maven-release-plugin] prepare release nuiton-web-parent-1.7
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-11-16 15:07:34 UTC (rev 144)
+++ trunk/nuiton-gwt/pom.xml 2011-11-18 14:29:17 UTC (rev 145)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.7-SNAPSHOT
+ 1.7
=20
nuiton-gwt
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-11-16 15:07:34 UTC (rev 144)
+++ trunk/nuiton-rss/pom.xml 2011-11-18 14:29:17 UTC (rev 145)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.7-SNAPSHOT
+ 1.7
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-11-16 15:07:34 UTC (rev 144)
+++ trunk/nuiton-struts2/pom.xml 2011-11-18 14:29:17 UTC (rev 145)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.7-SNAPSHOT
+ 1.7
=20
nuiton-struts2
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-11-16 15:07:34 UTC (rev 144)
+++ trunk/nuiton-tapestry/pom.xml 2011-11-18 14:29:17 UTC (rev 145)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.7-SNAPSHOT
+ 1.7
=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-11-16 15:07:34 UTC (rev 144)
+++ trunk/nuiton-web/pom.xml 2011-11-18 14:29:17 UTC (rev 145)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.7-SNAPSHOT
+ 1.7
=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-11-16 15:07:34 UTC (rev 144)
+++ trunk/pom.xml 2011-11-18 14:29:17 UTC (rev 145)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.7-SNAPSHOT
+ 1.7
=20
nuiton-web
@@ -315,11 +315,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-parent-1.7
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-parent-1.7
- http://www.nuiton.org/repositories/browse/nuiton-web/trunk
+ http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-parent-1.7
=20
--===============4769449302658843871==--
From maven-release@users.nuiton.org Fri Nov 18 15:29:18 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r146 - tags
Date: Fri, 18 Nov 2011 15:29:18 +0100
Message-ID: <20111118142918.7D448158B7@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3039602641434651585=="
--===============3039602641434651585==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: maven-release
Date: 2011-11-18 15:29:18 +0100 (Fri, 18 Nov 2011)
New Revision: 146
Url: http://nuiton.org/repositories/revision/nuiton-web/146
Log:
[maven-release-plugin] copy for tag nuiton-web-parent-1.7
Added:
tags/nuiton-web-parent-1.7/
--===============3039602641434651585==--
From maven-release@users.nuiton.org Fri Nov 18 15:29:19 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r147 - in trunk: . nuiton-gwt nuiton-rss
nuiton-struts2 nuiton-tapestry nuiton-web
Date: Fri, 18 Nov 2011 15:29:19 +0100
Message-ID: <20111118142919.37943158B3@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1224356999580327436=="
--===============1224356999580327436==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: maven-release
Date: 2011-11-18 15:29:19 +0100 (Fri, 18 Nov 2011)
New Revision: 147
Url: http://nuiton.org/repositories/revision/nuiton-web/147
Log:
[maven-release-plugin] prepare for next development iteration
Modified:
trunk/nuiton-gwt/pom.xml
trunk/nuiton-rss/pom.xml
trunk/nuiton-struts2/pom.xml
trunk/nuiton-tapestry/pom.xml
trunk/nuiton-web/pom.xml
trunk/pom.xml
Modified: 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 2011-11-18 14:29:18 UTC (rev 146)
+++ trunk/nuiton-gwt/pom.xml 2011-11-18 14:29:19 UTC (rev 147)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.7
+ 1.8-SNAPSHOT
=20
nuiton-gwt
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-11-18 14:29:18 UTC (rev 146)
+++ trunk/nuiton-rss/pom.xml 2011-11-18 14:29:19 UTC (rev 147)
@@ -33,7 +33,7 @@
org.nuiton.webnuiton-web-parent
- 1.7
+ 1.8-SNAPSHOT
=20
nuiton-rss
Modified: trunk/nuiton-struts2/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-struts2/pom.xml 2011-11-18 14:29:18 UTC (rev 146)
+++ trunk/nuiton-struts2/pom.xml 2011-11-18 14:29:19 UTC (rev 147)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.7
+ 1.8-SNAPSHOT
=20
nuiton-struts2
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-11-18 14:29:18 UTC (rev 146)
+++ trunk/nuiton-tapestry/pom.xml 2011-11-18 14:29:19 UTC (rev 147)
@@ -10,7 +10,7 @@
org.nuiton.webnuiton-web-parent
- 1.7
+ 1.8-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-11-18 14:29:18 UTC (rev 146)
+++ trunk/nuiton-web/pom.xml 2011-11-18 14:29:19 UTC (rev 147)
@@ -11,7 +11,7 @@
org.nuiton.webnuiton-web-parent
- 1.7
+ 1.8-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-11-18 14:29:18 UTC (rev 146)
+++ trunk/pom.xml 2011-11-18 14:29:19 UTC (rev 147)
@@ -15,7 +15,7 @@
=20
org.nuiton.webnuiton-web-parent
- 1.7
+ 1.8-SNAPSHOT
=20
nuiton-web
@@ -315,11 +315,11 @@
=20
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web=
-parent-1.7
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- scm:svn:http://svn.nuiton.org/svn/nuiton-web/tags/nuiton-web-parent-1.7
+ scm:svn:http://svn.nuiton.org/svn/nuiton-web/trunk
- http://www.nuiton.org/repositories/browse/nuiton-web/tags/nuiton-we=
b-parent-1.7
+ http://www.nuiton.org/repositories/browse/nuiton-web/trunk
=20
--===============1224356999580327436==--
From maven-release@users.nuiton.org Mon Nov 28 23:21:46 2011
From: maven-release@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r148 - trunk
Date: Mon, 28 Nov 2011 23:21:46 +0100
Message-ID: <20111128222146.7E8FB15A51@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0083951908584593657=="
--===============0083951908584593657==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Author: maven-release
Date: 2011-11-28 23:21:46 +0100 (Mon, 28 Nov 2011)
New Revision: 148
Url: http://nuiton.org/repositories/revision/nuiton-web/148
Log:
Update mavenpom4redmineAndCentral to 3.0.6.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-18 14:29:19 UTC (rev 147)
+++ trunk/pom.xml 2011-11-28 22:21:46 UTC (rev 148)
@@ -10,7 +10,7 @@
org.nuitonmavenpom4redmineAndCentral
- 3.0.5
+ 3.0.6org.nuiton.web
--===============0083951908584593657==--
From bleny@users.nuiton.org Thu Dec 1 14:54:58 2011
From: bleny@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r149 - in trunk/nuiton-struts2/src: .
main/java/org/nuiton/web/struts2/taglib site site/apt
Date: Thu, 01 Dec 2011 14:54:58 +0100
Message-ID: <20111201135458.4A7BE15A4D@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8995567971355257594=="
--===============8995567971355257594==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: bleny
Date: 2011-12-01 14:54:58 +0100 (Thu, 01 Dec 2011)
New Revision: 149
Url: http://nuiton.org/repositories/revision/nuiton-web/149
Log:
documentation for helptag
Added:
trunk/nuiton-struts2/src/site/
trunk/nuiton-struts2/src/site/apt/
trunk/nuiton-struts2/src/site/apt/index.apt
trunk/nuiton-struts2/src/site/apt/taglib.apt
trunk/nuiton-struts2/src/site/site_fr.xml
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.j=
ava
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/He=
lpTag.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-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java 2011-11-28 22:21:46 UTC (rev 148)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java 2011-12-01 13:54:58 UTC (rev 149)
@@ -8,6 +8,9 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
=20
+/**
+ * @since 1.7
+ */
public class HelpTag extends AbstractClosingTag {
=20
/** Logger. */
Added: trunk/nuiton-struts2/src/site/apt/taglib.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-struts2/src/site/apt/taglib.apt (rev=
0)
+++ trunk/nuiton-struts2/src/site/apt/taglib.apt 2011-12-01 13:54:58 UTC (rev=
149)
@@ -0,0 +1,94 @@
+
+The ns:help tag
+
+* Abstract
+
+ The ns:help tag allow you to enhance your forms by adding on them
+ extra-informations (such a tooltip)
+ =20
+ It may be helpful if you want your application to include to inline
+ help, gathering data from an aside user documentation.
+
+* Usage=20
+
+ Let's say you have a simple form:
+
+------------------------------------------------
+
+
+
+
+
+
+
+------------------------------------------------
+
+ Now, you want to make your form given the user helpful information about h=
ow
+ she can fill the field.
+
+------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+------------------------------------------------
+
+ But first of all, you muste define two things :
+
+ * A place where the help will appear, it must have the id "helpZone"
+
+ * A handler function called "getHelpAsHtml" returning the html that shou=
ld be
+ printed to the user. It can either call a Json action that will use a =
+ text provider and a bundle where the help message for each helpKey is =
stored
+
+
+------------------------------------------------
+
+ Here will appear your help message
+
+------------------------------------------------
+
+------------------------------------------------
+
+------------------------------------------------
+
+ You can surround more than one field with ns:help, all the fields will dis=
play
+ the help message. Instead of=20
+
+------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+------------------------------------------------
+
+ You can just
+
+------------------------------------------------
+
+
+
+
+
+
+
+
+------------------------------------------------
Added: trunk/nuiton-struts2/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-struts2/src/site/site_fr.xml (rev 0)
+++ trunk/nuiton-struts2/src/site/site_fr.xml 2011-12-01 13:54:58 UTC (rev 14=
9)
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+ ${project.name}
+ index.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--===============8995567971355257594==--
From bleny@users.nuiton.org Thu Dec 1 17:17:57 2011
From: bleny@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r150 - in
trunk/nuiton-web/src/main/java/org/nuiton/web: . filter jmx
Date: Thu, 01 Dec 2011 17:17:57 +0100
Message-ID: <20111201161757.5826F15A47@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5115251618393253779=="
--===============5115251618393253779==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: bleny
Date: 2011-12-01 17:17:57 +0100 (Thu, 01 Dec 2011)
New Revision: 150
Url: http://nuiton.org/repositories/revision/nuiton-web/150
Log:
#1841 Add a filter to gather stats on computation time for all application pa=
ges on a per page basis
Added:
trunk/nuiton-web/src/main/java/org/nuiton/web/filter/MonitoringFilter.java
trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/
trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/RequestStatistics.java
trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsService=
.java
trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsService=
MBean.java
Added: trunk/nuiton-web/src/main/java/org/nuiton/web/filter/MonitoringFilter.=
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/filter/MonitoringFilter.jav=
a (rev 0)
+++ trunk/nuiton-web/src/main/java/org/nuiton/web/filter/MonitoringFilter.jav=
a 2011-12-01 16:17:57 UTC (rev 150)
@@ -0,0 +1,90 @@
+package org.nuiton.web.filter;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.web.jmx.ServletStatisticsService;
+
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.ObjectName;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+
+/**
+ * Monitoring filter is a simple non-intrusive servlet filter that collect
+ * statistics about page computing time per request URI.
+ *
+ * All gathered data are published using JMX Bean to make it available throu=
gh
+ * monitoring tools such as jconsole.
+ *
+ * @since 1.8
+ */
+public class MonitoringFilter implements Filter {
+
+ /** Logger. */
+ private static final Log log =3D LogFactory.getLog(MonitoringFilter.clas=
s);
+
+ protected ObjectName servletStatisticsMBeanName;
+
+ protected ServletStatisticsService servletStatisticsService;
+
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ try {
+ MBeanServer server =3D ManagementFactory.getPlatformMBeanServer(=
);
+ // MBean implementation
+ servletStatisticsService =3D new ServletStatisticsService();
+ // Bind the stats to a SessionFactory
+ // Register the Mbean on the server
+ servletStatisticsMBeanName =3D new ObjectName("Servlet:applicati=
on=3DStatistics");
+ server.registerMBean(servletStatisticsService, servletStatistics=
MBeanName);
+ log.info("mbean " + servletStatisticsService + " attached as " +=
servletStatisticsMBeanName);
+ } catch (MalformedObjectNameException e) {
+ log.error("unable to register mbean", e);
+ } catch (InstanceAlreadyExistsException e) {
+ log.error("unable to register mbean", e);
+ } catch (MBeanRegistrationException e) {
+ log.error("unable to register mbean", e);
+ } catch (NotCompliantMBeanException e) {
+ log.error("unable to register mbean", e);
+ }
+ }
+
+ @Override
+ public void doFilter(ServletRequest servletRequest, ServletResponse serv=
letResponse, FilterChain filterChain) throws IOException, ServletException {
+
+ servletStatisticsService.preFilter(servletRequest, servletResponse, =
filterChain);
+
+ filterChain.doFilter(servletRequest, servletResponse);
+
+ servletStatisticsService.postFilter(servletRequest, servletResponse,=
filterChain);
+
+ }
+
+ @Override
+ public void destroy() {
+
+ log.info("statistics:\n" + servletStatisticsService.toCsv());
+
+ try {
+ MBeanServer server =3D ManagementFactory.getPlatformMBeanServer(=
);
+ server.unregisterMBean(servletStatisticsMBeanName);
+ log.info("mbean detached " + servletStatisticsMBeanName);
+ } catch (InstanceNotFoundException e) {
+ log.error("unable to unregister mbean", e);
+ } catch (MBeanRegistrationException e) {
+ log.error("unable to unregister mbean", e);
+ }
+ }
+
+}
Added: trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/RequestStatistics.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-web/src/main/java/org/nuiton/web/jmx/RequestStatistics.java =
(rev 0)
+++ trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/RequestStatistics.java =
2011-12-01 16:17:57 UTC (rev 150)
@@ -0,0 +1,56 @@
+package org.nuiton.web.jmx;
+
+import java.io.Serializable;
+
+public class RequestStatistics implements Serializable {
+
+ protected int count;
+
+ protected long elapsedSum;
+
+ protected long lowestElapsed =3D Long.MAX_VALUE;
+
+ protected long highestElapsed;
+
+ public int getCount() {
+ return count;
+ }
+
+ public long getElapsedSum() {
+ return elapsedSum;
+ }
+
+ public long getLowestElapsed() {
+ return lowestElapsed;
+ }
+
+ public long getHighestElapsed() {
+ return highestElapsed;
+ }
+
+ public long getAverageElapsed() {
+ return elapsedSum / count;
+ }
+
+ public void count(long start, long stop) {
+ count +=3D 1;
+ long elapsed =3D stop - start;
+ elapsedSum +=3D elapsed;
+ if (elapsed < lowestElapsed) {
+ lowestElapsed =3D elapsed;
+ }
+ if (elapsed > highestElapsed) {
+ highestElapsed =3D elapsed;
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "count=3D" + count +
+ ", elapsedSum=3D" + elapsedSum +
+ ", lowestElapsed=3D" + lowestElapsed +
+ ", highestElapsed=3D" + highestElapsed +
+ ", averageElapsed=3D" + getAverageElapsed() +
+ '}';
+ }
+}
Added: trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsSer=
vice.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/jmx/ServletStatisticsServic=
e.java (rev 0)
+++ trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsServic=
e.java 2011-12-01 16:17:57 UTC (rev 150)
@@ -0,0 +1,80 @@
+package org.nuiton.web.jmx;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Implementation of {@link ServletStatisticsServiceMBean}.
+ *
+ *
+ */
+public class ServletStatisticsService implements ServletStatisticsServiceMBe=
an {
+
+ protected Map requestStartTime =3D
+ new HashMap();
+
+ protected Map perRequestStatistics =3D
+ new HashMap();
+
+ public void preFilter(ServletRequest servletRequest, ServletResponse ser=
vletResponse, FilterChain filterChain) {
+
+ long start =3D System.currentTimeMillis();
+
+ requestStartTime.put(servletRequest, start);
+
+ }
+
+ public void postFilter(ServletRequest servletRequest, ServletResponse se=
rvletResponse, FilterChain filterChain) {
+
+ String contentType =3D servletResponse.getContentType();
+
+ if (contentType !=3D null && contentType.startsWith("text/html")) {
+
+ long stop =3D System.currentTimeMillis();
+
+ long start =3D requestStartTime.get(servletRequest);
+
+ if (servletRequest instanceof HttpServletRequest) {
+ String requestURI =3D ((HttpServletRequest) servletRequest).=
getRequestURI();
+ RequestStatistics requestStatistics =3D
+ (RequestStatistics) perRequestStatistics.get(request=
URI);
+ if (requestStatistics =3D=3D null) {
+ requestStatistics =3D new RequestStatistics();
+ perRequestStatistics.put(requestURI, requestStatistics);
+ }
+ requestStatistics.count(start, stop);
+ }
+ }
+
+ requestStartTime.remove(servletRequest);
+ }
+
+ public Map getPerRequestStatistics() {
+ return perRequestStatistics;
+ }
+
+ @Override
+ public String toCsv() {
+ StringBuilder csv =3D new StringBuilder();
+ csv.append("PAGE,NOMBRE_DEMANDES,DUREE_TOTALE,DUREE_MOYENNE,DUREE_MI=
N,DUREE_MAX\n");
+ for (Map.Entry requestStatistics : perReq=
uestStatistics.entrySet()) {
+ String request =3D requestStatistics.getKey();
+ RequestStatistics statistics =3D requestStatistics.getValue();
+ csv.append(request).append(',')
+ .append(statistics.getCount()).append(',')
+ .append(statistics.getElapsedSum()).append(',')
+ .append(statistics.getAverageElapsed()).append(',')
+ .append(statistics.getLowestElapsed()).append(',')
+ .append(statistics.getHighestElapsed()).append('\n');
+ }
+ return csv.toString();
+ }
+
+ @Override
+ public void reset() {
+ perRequestStatistics.clear();
+ }
+}
Added: trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsSer=
viceMBean.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/jmx/ServletStatisticsServic=
eMBean.java (rev 0)
+++ trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsServic=
eMBean.java 2011-12-01 16:17:57 UTC (rev 150)
@@ -0,0 +1,12 @@
+package org.nuiton.web.jmx;
+
+import java.util.Map;
+
+public interface ServletStatisticsServiceMBean {
+
+ Map getPerRequestStatistics();
+
+ void reset();
+
+ String toCsv();
+}
--===============5115251618393253779==--
From athimel@users.nuiton.org Thu Dec 1 18:09:08 2011
From: athimel@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r151 -
trunk/nuiton-struts2/src/main/resources/template/css_xhtml
Date: Thu, 01 Dec 2011 18:09:08 +0100
Message-ID: <20111201170908.3BFAD15A4D@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0576474675890726140=="
--===============0576474675890726140==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: athimel
Date: 2011-12-01 18:09:08 +0100 (Thu, 01 Dec 2011)
New Revision: 151
Url: http://nuiton.org/repositories/revision/nuiton-web/151
Log:
Evolution #1808 - Help tag now working
Modified:
trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
Modified: trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/css_xhtml/help.ftl 2011-=
12-01 16:17:57 UTC (rev 150)
+++ trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl 2011-=
12-01 17:09:08 UTC (rev 151)
@@ -1,40 +1,38 @@
+
\ No newline at end of file
--===============0576474675890726140==--
From athimel@users.nuiton.org Thu Dec 1 18:16:59 2011
From: athimel@users.nuiton.org
To: nuiton-web-commits@list.nuiton.org
Subject: [Nuiton-web-commits] r152 - in trunk:
nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib
nuiton-struts2/src/main/resources/META-INF/tld
nuiton-struts2/src/main/resources/template/css_xhtml nuiton-struts2/src/site
nuiton-struts2/src/site/apt nuiton-web/src/main/java/org/nuiton/web/filter
nuiton-web/src/main/java/org/nuiton/web/jmx
Date: Thu, 01 Dec 2011 18:16:59 +0100
Message-ID: <20111201171659.9DA3215A4D@nuiton.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============6491726266299911421=="
--===============6491726266299911421==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Author: athimel
Date: 2011-12-01 18:16:59 +0100 (Thu, 01 Dec 2011)
New Revision: 152
Url: http://nuiton.org/repositories/revision/nuiton-web/152
Log:
Add missing file headers
Modified:
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean.=
java
trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.j=
ava
trunk/nuiton-struts2/src/main/resources/META-INF/tld/nuiton-tags.tld
trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help-close.ftl
trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
trunk/nuiton-struts2/src/site/apt/index.apt
trunk/nuiton-struts2/src/site/apt/taglib.apt
trunk/nuiton-struts2/src/site/site_fr.xml
trunk/nuiton-web/src/main/java/org/nuiton/web/filter/MonitoringFilter.java
trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/RequestStatistics.java
trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsService=
.java
trunk/nuiton-web/src/main/java/org/nuiton/web/jmx/ServletStatisticsService=
MBean.java
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/He=
lpBean.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-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean=
.java 2011-12-01 17:09:08 UTC (rev 151)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpBean=
.java 2011-12-01 17:16:59 UTC (rev 152)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * Nuiton Web :: Nuiton Struts 2
+ *=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.struts2.taglib;
=20
import com.opensymphony.xwork2.util.ValueStack;
Property changes on: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts=
2/taglib/HelpBean.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/He=
lpTag.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-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java 2011-12-01 17:09:08 UTC (rev 151)
+++ trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts2/taglib/HelpTag.=
java 2011-12-01 17:16:59 UTC (rev 152)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * Nuiton Web :: Nuiton Struts 2
+ *=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.struts2.taglib;
=20
import com.opensymphony.xwork2.util.ValueStack;
Property changes on: trunk/nuiton-struts2/src/main/java/org/nuiton/web/struts=
2/taglib/HelpTag.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/nuiton-struts2/src/main/resources/META-INF/tld/nui=
ton-tags.tld
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help-clo=
se.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/css_xhtml/help-close.ftl=
2011-12-01 17:09:08 UTC (rev 151)
+++ trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help-close.ftl=
2011-12-01 17:16:59 UTC (rev 152)
@@ -1 +1,25 @@
+<#--
+ #%L
+ Nuiton Web :: Nuiton Struts 2
+=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%
+-->
\ No newline at end of file
Property changes on: trunk/nuiton-struts2/src/main/resources/template/css_xht=
ml/help-close.ftl
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-struts2/src/main/resources/template/css_xhtml/help.ftl 2011-=
12-01 17:09:08 UTC (rev 151)
+++ trunk/nuiton-struts2/src/main/resources/template/css_xhtml/help.ftl 2011-=
12-01 17:16:59 UTC (rev 152)
@@ -1,3 +1,27 @@
+<#--
+ #%L
+ Nuiton Web :: Nuiton Struts 2
+=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%
+-->