Vradi-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- 198 discussions
Author: bpoussin
Date: 2011-05-21 14:43:44 +0200 (Sat, 21 May 2011)
New Revision: 38
Url: http://chorem.org/repositories/revision/vradi/38
Log:
add new class for FormNote (aka AO reponse)
Modified:
trunk/vradi-entities/src/main/xmi/vradi.zargo
Modified: trunk/vradi-entities/src/main/xmi/vradi.zargo
===================================================================
(Binary files differ)
1
0
r37 - trunk/vradi-web/src/main/java/org/chorem/vradi/actions
by bpoussin@users.chorem.org 21 May '11
by bpoussin@users.chorem.org 21 May '11
21 May '11
Author: bpoussin
Date: 2011-05-21 14:42:40 +0200 (Sat, 21 May 2011)
New Revision: 37
Url: http://chorem.org/repositories/revision/vradi/37
Log:
add constant to find current action in context
Modified:
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-05-21 12:05:26 UTC (rev 36)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-05-21 12:42:40 UTC (rev 37)
@@ -27,6 +27,16 @@
protected static final Log log = LogFactory.getLog(VradiBaseAction.class);
+ /**
+ * Key to find current action in context.
+ * child can have method
+ * <pre>
+ * static public ChildAction getAction() {
+ * return (ChildAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
+ * }
+ * </pre>
+ */
+ protected static final String CONTEXT_ACTION_KEY = "action";
public static final String UNTRANSLATED_MARKER = "???";
protected Map<String, Object> session;
1
0
Author: bpoussin
Date: 2011-05-21 14:05:26 +0200 (Sat, 21 May 2011)
New Revision: 36
Url: http://chorem.org/repositories/revision/vradi/36
Log:
modfication de la conf par defaut pour facilement tester l'application
Modified:
trunk/vradi-web/src/main/resources/vradi-web.properties
Modified: trunk/vradi-web/src/main/resources/vradi-web.properties
===================================================================
--- trunk/vradi-web/src/main/resources/vradi-web.properties 2011-05-21 11:25:12 UTC (rev 35)
+++ trunk/vradi-web/src/main/resources/vradi-web.properties 2011-05-21 12:05:26 UTC (rev 36)
@@ -1,3 +1,7 @@
+#
+# Configuration file for vradi-web, that use standalone wikitty instance
+# located in /var/local/vradi-web and used h2 database
+#
application.name=${project.name}
application.version=${project.version}
application.site.url=http://maven-site.chorem.org/vradi/index.html
@@ -6,11 +10,28 @@
application.organisation.name=${project.organization.name}
application.organisation.url=${project.organization.url}
+vradi.data.dir=/var/local/vradi-web
+vradi.smtp.host=mail.codelutin.com
+vradi.smtp.port=1194
+
# Wikitty
-wikitty.WikittyService.components=org.nuiton.wikitty.services.WikittyServiceHessianClient,\
+wikitty.data.directory=${vradi.data.dir}
+wikitty.storage.jdbc.driver=org.h2.Driver
+wikitty.storage.jdbc.host=jdbc:h2:file:${wikitty.data.directory}/data/db
+wikitty.storage.jdbc.login=sa
+wikitty.storage.jdbc.password=
+wikitty.storage.jdbc.xadatasource=org.h2.jdbcx.JdbcDataSource
+wikitty.storage.jdbc.xadatasource.org.h2.jdbcx.JdbcDataSource.URL=${wikitty.storage.jdbc.host}
+wikitty.storage.jdbc.xadatasource.org.h2.jdbcx.JdbcDataSource.user=${wikitty.storage.jdbc.login}
+wikitty.storage.jdbc.xadatasource.org.h2.jdbcx.JdbcDataSource.password=${wikitty.storage.jdbc.password}
+wikitty.searchengine.solr.directory.data=${wikitty.data.directory}/data/solr
+wikitty.WikittyService.components=org.nuiton.wikitty.services.WikittyServiceStorage,\
org.nuiton.wikitty.services.WikittyServiceNotifier,\
org.nuiton.wikitty.services.WikittyServiceCached,\
org.nuiton.wikitty.services.WikittyServiceSecurity
+wikitty.WikittyServiceStorage.components=org.nuiton.wikitty.jdbc.WikittyExtensionStorageJDBC,\
+org.nuiton.wikitty.jdbc.WikittyStorageJDBC,\
+org.nuiton.wikitty.storage.solr.WikittySearchEngineSolr
wikitty.service.cache.allwaysRestoreCopies=false
wikitty.service.event.propagate=false
wikitty.service.event.listen=true
1
0
21 May '11
Author: bpoussin
Date: 2011-05-21 13:25:12 +0200 (Sat, 21 May 2011)
New Revision: 35
Url: http://chorem.org/repositories/revision/vradi/35
Log:
add some acceptable default value
Modified:
trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java
Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java
===================================================================
--- trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java 2011-05-20 19:00:23 UTC (rev 34)
+++ trunk/vradi-services/src/main/java/org/chorem/vradi/VradiServiceConfiguration.java 2011-05-21 11:25:12 UTC (rev 35)
@@ -199,22 +199,22 @@
SMTP_HOST(
"vradi.smtp.host",
_("vradi.service.config.smtp.host.description"),
- null, String.class, false, false),
+ "localhost", String.class, false, false),
SMTP_PORT(
"vradi.smtp.port",
_("vradi.service.config.smtp.port.description"),
- null, Integer.class, false, false),
+ "25", Integer.class, false, false),
IMAP_HOST(
"vradi.imap.host",
_("vradi.service.config.imap.host.description"),
- null, Integer.class, false, false),
+ "localhost", Integer.class, false, false),
IMAP_PORT(
"vradi.imap.port",
_("vradi.service.config.imap.port.description"),
- null, Integer.class, false, false),
+ "143", Integer.class, false, false),
MAIL_USER(
"vradi.mail.user",
@@ -224,12 +224,12 @@
MAIL_FROM(
"vradi.mail.from",
_("vradi.service.config.mail.from.description"),
- null, String.class, false, false),
+ "noreply(a)vradi.chorem.org", String.class, false, false),
MAIL_FROM_NAME(
"vradi.mail.fromname",
_("vradi.service.config.mail.fromname.description"),
- null, String.class, false, false),
+ "Vradi", String.class, false, false),
MAIL_PASSWORD(
"vradi.mail.password",
@@ -239,7 +239,7 @@
MAIL_OFFER_SUBJECT(
"vradi.mail.offer.subject",
_("vradi.service.config.mail.offer.subject.description"),
- null, String.class, false, false),
+ "Today vradi selection", String.class, false, false),
SESSION_DEFAULT_PARAGRAPH(
"vradi.session.defaultParagraph",
1
0
r34 - in trunk: . vradi-web vradi-web/src/main/java/org/chorem/vradi vradi-web/src/main/java/org/chorem/vradi/actions vradi-web/src/main/resources vradi-web/src/main/resources/i18n vradi-web/src/main/webapp vradi-web/src/main/webapp/jsp
by sletellier@users.chorem.org 20 May '11
by sletellier@users.chorem.org 20 May '11
20 May '11
Author: sletellier
Date: 2011-05-20 21:00:23 +0200 (Fri, 20 May 2011)
New Revision: 34
Url: http://chorem.org/repositories/revision/vradi/34
Log:
#378 Cr?\195?\169ation de la zone de recherche et de resultats
Added:
trunk/vradi-web/src/main/java/org/chorem/vradi/FormPaginatedList.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java
trunk/vradi-web/src/main/webapp/jsp/search.jsp
Removed:
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java
trunk/vradi-web/src/main/webapp/jsp/home.jsp
Modified:
trunk/pom.xml
trunk/vradi-web/pom.xml
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/resources/struts.xml
trunk/vradi-web/src/main/webapp/index.html
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/pom.xml 2011-05-20 19:00:23 UTC (rev 34)
@@ -419,7 +419,20 @@
<version>${struts2Version}</version>
</dependency>
+ <!-- Displaytag -->
<dependency>
+ <groupId>displaytag</groupId>
+ <artifactId>displaytag</artifactId>
+ <version>1.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl104-over-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
Modified: trunk/vradi-web/pom.xml
===================================================================
--- trunk/vradi-web/pom.xml 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/pom.xml 2011-05-20 19:00:23 UTC (rev 34)
@@ -79,7 +79,14 @@
<artifactId>xwork-core</artifactId>
</dependency>
+ <!-- Displaytag -->
<dependency>
+ <groupId>displaytag</groupId>
+ <artifactId>displaytag</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<scope>runtime</scope>
@@ -174,6 +181,7 @@
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
+
</dependencies>
<build>
@@ -212,6 +220,7 @@
<s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s>
<sx>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sx>
<sj>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sj>
+ <displaytag>http://displaytag.sourceforge.net/1.2/#displaytag.tld</displaytag>
<jsp>http://java.sun.com/JSP/Page</jsp>
</namespaces>
</configuration>
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/FormPaginatedList.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/FormPaginatedList.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/FormPaginatedList.java 2011-05-20 19:00:23 UTC (rev 34)
@@ -0,0 +1,60 @@
+package org.chorem.vradi;
+
+import org.chorem.vradi.beans.FormPagedResult;
+import org.chorem.vradi.entities.Form;
+import org.displaytag.pagination.PaginatedList;
+import org.displaytag.properties.SortOrderEnum;
+import org.nuiton.wikitty.WikittyProxy;
+
+import java.util.List;
+
+/**
+ * @author sletellier
+ */
+public class FormPaginatedList implements PaginatedList {
+
+ protected FormPagedResult result;
+ protected WikittyProxy proxy;
+
+ public FormPaginatedList(WikittyProxy proxy, FormPagedResult result) {
+ this.result = result;
+ this.proxy = proxy;
+ }
+
+ @Override
+ public List<Form> getList() {
+ List<String> formsIdsToShow = result.getFormsIdsToShow();
+
+ return proxy.restore(Form.class, formsIdsToShow);
+ }
+
+ @Override
+ public int getPageNumber() {
+ return result.getPageToShow();
+ }
+
+ @Override
+ public int getObjectsPerPage() {
+ return result.getNbFormsToShow();
+ }
+
+ @Override
+ public int getFullListSize() {
+ return result.getTotalFoundFormNb();
+ }
+
+ @Override
+ public String getSortCriterion() {
+ return null;
+ }
+
+ @Override
+ public SortOrderEnum getSortDirection() {
+ return null;
+ }
+
+ @Override
+ public String getSearchId() {
+ return null;
+ }
+}
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-20 19:00:23 UTC (rev 34)
@@ -7,6 +7,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.vradi.entities.VradiUser;
+import org.chorem.vradi.services.VradiDataService;
+import org.chorem.vradi.services.VradiDataServiceImpl;
import org.nuiton.i18n.I18n;
import org.nuiton.i18n.init.DefaultI18nInitializer;
import org.nuiton.util.ApplicationConfig;
@@ -33,6 +35,8 @@
protected WikittyProxy proxy;
protected ApplicationConfig config;
+ protected VradiDataService dataService;
+
private VradiUser user;
public VradiSession() {
@@ -42,6 +46,8 @@
WikittyService ws = WikittyServiceFactory.buildWikittyService(config);
proxy = new WikittyProxy(config, ws);
+ dataService = new VradiDataServiceImpl(config, proxy);
+
// init I18n
I18n.init(new DefaultI18nInitializer("vradi-i18n", getClass().getClassLoader(), "/"), null);
}
@@ -82,6 +88,10 @@
return proxy;
}
+ public VradiDataService getDataService() {
+ return dataService;
+ }
+
public VradiUser getUser() {
return user;
}
Deleted: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java 2011-05-20 19:00:23 UTC (rev 34)
@@ -1,18 +0,0 @@
-package org.chorem.vradi.actions;
-
-/**
- * Prepare l'affichage de la page d'accueil
- *
- * @author poussin
- */
-public class HomeAction extends VradiBaseAction {
-
- private static final long serialVersionUID = -3735250067223062719L;
-
- /**
- * Initializes everything before displaying the home page
- */
- public String execute() {
- return SUCCESS;
- }
-}
\ No newline at end of file
Copied: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java (from rev 32, trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java)
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SearchAction.java 2011-05-20 19:00:23 UTC (rev 34)
@@ -0,0 +1,65 @@
+package org.chorem.vradi.actions;
+
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.chorem.vradi.FormPaginatedList;
+import org.chorem.vradi.beans.FormPagedResult;
+import org.chorem.vradi.beans.QueryParameters;
+import org.chorem.vradi.services.VradiException;
+import org.chorem.vradi.services.search.UnsupportedQueryException;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Search action
+ *
+ * @author sletellier
+ */
+public class SearchAction extends VradiBaseAction implements ServletRequestAware {
+
+ private static final long serialVersionUID = -3735250067223062719L;
+
+ public static final int NB_FORMS_TO_SHOW = 100;
+
+ protected String query;
+ protected FormPagedResult result;
+ protected HttpServletRequest request;
+
+ public String getQuery() {
+ return query;
+ }
+
+ public void setQuery(String query) {
+ this.query = query;
+ }
+
+ @Override
+ public void setServletRequest(HttpServletRequest request) {
+ this.request = request;
+ }
+
+ /**
+ * Initializes everything before displaying the home page
+ */
+ public String execute() {
+
+ if (result == null) {
+ result = new FormPagedResult();
+ result.setNbFormsToShow(NB_FORMS_TO_SHOW);
+ }
+
+ QueryParameters queryParameters = new QueryParameters(query);
+
+ try {
+ result = getDataService().findForms(queryParameters, result);
+ log.info(result.getTotalFoundFormNb() + " forms found");
+ } catch (VradiException eee) {
+ log.error("Failed to execute query", eee);
+ } catch (UnsupportedQueryException eee) {
+ log.error("Unsuported query", eee);
+ }
+
+ request.setAttribute("forms", new FormPaginatedList(getProxy(), result));
+
+ return SUCCESS;
+ }
+}
\ No newline at end of file
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-05-20 19:00:23 UTC (rev 34)
@@ -9,6 +9,7 @@
import java.util.Map;
import org.apache.struts2.interceptor.SessionAware;
import org.chorem.vradi.VradiSession;
+import org.chorem.vradi.services.VradiDataService;
import org.nuiton.util.ApplicationConfig;
import org.nuiton.wikitty.WikittyProxy;
@@ -40,6 +41,10 @@
return result;
}
+ public VradiDataService getDataService() {
+ return getVradiSession().getDataService();
+ }
+
public ApplicationConfig getConfig() {
return getVradiSession().getConfig();
}
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-05-20 19:00:23 UTC (rev 34)
@@ -21,4 +21,6 @@
vradi.register.mailPwd=Your password
vradi.register.mailSubject=[Vradi] Your user informations
vradi.register.submit=Login
-vradi.register.title=Login
\ No newline at end of file
+vradi.register.title=Login
+vradi.search.submit=Search
+vradi.search.title=Search
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-20 19:00:23 UTC (rev 34)
@@ -22,3 +22,5 @@
vradi.register.pwdDontMatch=Les mots de passe sont différents
vradi.register.submit=S'enregistrer
vradi.register.title=S'enregistrer
+vradi.search.submit=Rechercher
+vradi.search.title=Recherche
Modified: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-05-20 19:00:23 UTC (rev 34)
@@ -56,7 +56,7 @@
<package name="login" extends="loginArea">
<action name="register_*" method="{1}" class="org.chorem.vradi.actions.RegisterAction">
<result name="input">/jsp/register.jsp</result>
- <result type="redirectAction">home</result>
+ <result type="redirectAction">search</result>
</action>
<action name="forgotPassword_*" method="{1}" class="org.chorem.vradi.actions.ForgotPasswordAction">
<result name="input">/jsp/forgotPassword.jsp</result>
@@ -64,8 +64,8 @@
</action>
<action name="login_*" method="{1}" class="org.chorem.vradi.actions.LoginAction">
<result name="input">/jsp/login.jsp</result>
- <result name="login" type="redirectAction">home</result>
- <result type="redirectAction">home</result>
+ <result name="login" type="redirectAction">search</result>
+ <result type="redirectAction">search</result>
</action>
<action name="logout" class="org.chorem.vradi.actions.LogoutAction">
<result type="redirectAction">login_input</result>
@@ -73,9 +73,9 @@
</package>
<package name="misc" extends="restrictedArea">
- <action name="home" class="org.chorem.vradi.actions.HomeAction">
- <result>/jsp/home.jsp</result>
- <result name="input" type="redirectAction">home</result>
+ <action name="search" class="org.chorem.vradi.actions.SearchAction">
+ <result>/jsp/search.jsp</result>
+ <result name="input" type="redirectAction">search</result>
</action>
</package>
Modified: trunk/vradi-web/src/main/webapp/index.html
===================================================================
--- trunk/vradi-web/src/main/webapp/index.html 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/webapp/index.html 2011-05-20 19:00:23 UTC (rev 34)
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <meta http-equiv="refresh" content="0;URL=home.action"/>
+ <meta http-equiv="refresh" content="0;URL=search.action"/>
<title>Vradi web</title>
</head>
Deleted: trunk/vradi-web/src/main/webapp/jsp/home.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/jsp/home.jsp 2011-05-20 15:25:09 UTC (rev 33)
+++ trunk/vradi-web/src/main/webapp/jsp/home.jsp 2011-05-20 19:00:23 UTC (rev 34)
@@ -1,5 +0,0 @@
-<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
-<html>
-<head><title>Simple jsp page</title></head>
-<body>Place your content here</body>
-</html>
\ No newline at end of file
Copied: trunk/vradi-web/src/main/webapp/jsp/search.jsp (from rev 32, trunk/vradi-web/src/main/webapp/jsp/home.jsp)
===================================================================
--- trunk/vradi-web/src/main/webapp/jsp/search.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/jsp/search.jsp 2011-05-20 19:00:23 UTC (rev 34)
@@ -0,0 +1,21 @@
+<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags"%>
+<%@taglib prefix="displaytag" uri="http://displaytag.sf.net"%>
+<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page">
+ <head>
+ <title><s:text name="vradi.search.title" /></title>
+ <s:head />
+ </head>
+ <body>
+ <s:form id="searchForm" action="search" method="post">
+ <s:textarea id="searchArea" name="query"/>
+ <s:submit key="vradi.search.submit" name="submit" />
+ </s:form>
+ <displaytag:table name="forms" id="f" requestURI="search.action">
+ <displaytag:column titleKey="vradi.form.title" property="creationDate"/>
+ <displaytag:column titleKey="vradi.form.title" property="objet"/>
+ <displaytag:column titleKey="vradi.form.title" property="sourceURL"/>
+ </displaytag:table>
+ </body>
+</html>
\ No newline at end of file
1
0
r33 - in trunk: . vradi-web vradi-web/src/main/i18n vradi-web/src/main/java/org/chorem/vradi vradi-web/src/main/java/org/chorem/vradi/actions vradi-web/src/main/resources vradi-web/src/main/resources/i18n
by sletellier@users.chorem.org 20 May '11
by sletellier@users.chorem.org 20 May '11
20 May '11
Author: sletellier
Date: 2011-05-20 17:25:09 +0200 (Fri, 20 May 2011)
New Revision: 33
Url: http://chorem.org/repositories/revision/vradi/33
Log:
- Use stable wikitty version
- Fix I18n
Modified:
trunk/pom.xml
trunk/vradi-web/pom.xml
trunk/vradi-web/src/main/i18n/jsp.rules
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/resources/log4j.properties
trunk/vradi-web/src/main/resources/struts.properties
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/pom.xml 2011-05-20 15:25:09 UTC (rev 33)
@@ -114,7 +114,7 @@
<nuitonI18nVersion>2.4</nuitonI18nVersion>
<nuitonWidgetVersion>1.1.1</nuitonWidgetVersion>
<generatorPluginVersion>2.3.3</generatorPluginVersion>
- <wikittyVersion>3.1.3-SNAPSHOT</wikittyVersion>
+ <wikittyVersion>3.1.2</wikittyVersion>
<oooVersion>3.2.1</oooVersion>
<javamailVersion>1.4.3</javamailVersion>
<slf4jVersion>1.6.1</slf4jVersion>
@@ -128,6 +128,12 @@
<!-- license to use -->
<license.licenseName>agpl_v3</license.licenseName>
+ <!-- i18n configuration -->
+ <i18n.bundles>fr_FR,en_GB</i18n.bundles>
+ <i18n.silent>true</i18n.silent>
+ <i18n.bundleOutputEncoding>UTF-8</i18n.bundleOutputEncoding>
+ <i18n.bundleFormatConverter>toMessageFormat</i18n.bundleFormatConverter>
+
</properties>
<dependencyManagement>
Modified: trunk/vradi-web/pom.xml
===================================================================
--- trunk/vradi-web/pom.xml 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/pom.xml 2011-05-20 15:25:09 UTC (rev 33)
@@ -24,13 +24,11 @@
<packaging>war</packaging>
<properties>
- <i18n.bundles>fr_FR,en_GB</i18n.bundles>
+
<i18n.silent>true</i18n.silent>
- <i18n.bundleOutputName>vradi-web-i18n</i18n.bundleOutputName>
- <i18n.bundleOutputDir>
- ${basedir}/target/generated-sources/resources
- </i18n.bundleOutputDir>
- <i18n.addBundleOuputDirParent>false</i18n.addBundleOuputDirParent>
+ <i18n.bundleOutputName>vradi-i18n</i18n.bundleOutputName>
+ <i18n.bundleOutputPackage/>
+
</properties>
<dependencies>
@@ -213,6 +211,7 @@
<namespaces>
<s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s>
<sx>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sx>
+ <sj>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sj>
<jsp>http://java.sun.com/JSP/Page</jsp>
</namespaces>
</configuration>
Modified: trunk/vradi-web/src/main/i18n/jsp.rules
===================================================================
--- trunk/vradi-web/src/main/i18n/jsp.rules 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/src/main/i18n/jsp.rules 2011-05-20 15:25:09 UTC (rev 33)
@@ -3,7 +3,11 @@
//s:text/@name
//s:submit/@key
//s:textfield/@key
+//s:checkbox/@key
//s:password/@key
//s:file/@key
+//s:label/@key
+//s:optiontransferselect/@key
+//s:select/@key
//sx:datetimepicker/@key
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-20 15:25:09 UTC (rev 33)
@@ -43,7 +43,7 @@
proxy = new WikittyProxy(config, ws);
// init I18n
-// I18n.init(new DefaultI18nInitializer("vradi-i18n"), null);
+ I18n.init(new DefaultI18nInitializer("vradi-i18n", getClass().getClassLoader(), "/"), null);
}
public void invalidate() {
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java 2011-05-20 15:25:09 UTC (rev 33)
@@ -108,7 +108,7 @@
REMOTE_ENDPOINT(
"vradi.remote.endpoint",
_("vradi.config.remote.endpoint.description"),
- "http://localhost:8080", String.class, false, false);
+ null, String.class, false, false);
public String key;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java 2011-05-20 15:25:09 UTC (rev 33)
@@ -131,7 +131,7 @@
try {
String mailContent;
- mailContent = getText(n_("vradi.register.mailHi")) + ",\n\n" + getText(n_("vradi.register.mailPwd")) + ": " + password + "\n\n" + getText(n_("bow.register.mailEmail")) + ": " + email + "\n\n";
+ mailContent = getText(n_("vradi.register.mailHi")) + ",\n\n" + getText(n_("vradi.register.mailPwd")) + ": " + password + "\n\n" + getText(n_("vradi.register.mailEmail")) + ": " + email + "\n\n";
MailingManager.postMail(getConfig(), email, getText(n_("vradi.register.mailSubject")), false, mailContent);
} catch (AddressException e) {
//If the email address is invalid
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-20 15:25:09 UTC (rev 33)
@@ -1,4 +1,3 @@
-bow.register.mailEmail=
vradi.config.configFileName.description=Fichier de configuration de Vradi web
vradi.config.database.version.description=Version de la base de donnée
vradi.config.last.version.description=Dernière version de Vradi web lancée
@@ -6,7 +5,7 @@
vradi.config.ui.locale=Locale de l'instance de Vradi web
vradi.config.version.description=Version de Vradi web
vradi.error.internal=Une erreur interne est survenue, merci de contacter un administrateur si cette erreur persiste
-vradi.forgotPassword.emailDoesntExist=Cette adresse email n''existe pas
+vradi.forgotPassword.emailDoesntExist=Cette adresse email n'existe pas
vradi.forgotpwd.submit=Envoyer
vradi.forgotpwd.title=Vous avez oublié votre mot de passe ?
vradi.login.email=Email
@@ -15,11 +14,11 @@
vradi.login.submit=Veuillez retaper votre mot de passe
vradi.login.title=Connection
vradi.register.emailAldyUsed=Cette adresse email est déjà utilisée
-vradi.register.invalidLogin=Une erreur s''est produite pendant l''enregistrement de vos informations, merci d''essayer à nouveau
+vradi.register.invalidLogin=Une erreur s'est produite pendant l'enregistrement de vos informations, merci d'essayer à nouveau
vradi.register.mailEmail=Votre email
vradi.register.mailHi=Bonjour
vradi.register.mailPwd=Votre mot de passe
vradi.register.mailSubject=[Vradi] Vos informations utilisateurs
vradi.register.pwdDontMatch=Les mots de passe sont différents
-vradi.register.submit=S''enregistrer
-vradi.register.title=S''enregistrer
+vradi.register.submit=S'enregistrer
+vradi.register.title=S'enregistrer
Modified: trunk/vradi-web/src/main/resources/log4j.properties
===================================================================
--- trunk/vradi-web/src/main/resources/log4j.properties 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/src/main/resources/log4j.properties 2011-05-20 15:25:09 UTC (rev 33)
@@ -0,0 +1,12 @@
+# Global logging configuration
+log4j.rootLogger=FATAL, stdout
+
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %5p [%t] (%F:%L) %M - %m%n
+
+# package level
+log4j.logger.org.chorem.vradi=DEBUG
+#log4j.logger.org.nuiton.util.TimeLog=WARN
+log4j.logger.org.apache.struts2.dispatcher.mapper=DEBUG
Modified: trunk/vradi-web/src/main/resources/struts.properties
===================================================================
--- trunk/vradi-web/src/main/resources/struts.properties 2011-05-20 14:08:45 UTC (rev 32)
+++ trunk/vradi-web/src/main/resources/struts.properties 2011-05-20 15:25:09 UTC (rev 33)
@@ -34,7 +34,7 @@
struts.url.http.port = 80
struts.url.https.port = 443
-struts.custom.i18n.resources=vradi-web-i18n
+struts.custom.i18n.resources=vradi-i18n
struts.dispatcher.parametersWorkaround = false
1
0
Author: sletellier
Date: 2011-05-20 16:08:45 +0200 (Fri, 20 May 2011)
New Revision: 32
Url: http://chorem.org/repositories/revision/vradi/32
Log:
#376 Cr?\195?\169ation de l'authentification
Added:
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ForgotPasswordAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LoginAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LogoutAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/
trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java
trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LogoutInterceptor.java
trunk/vradi-web/src/main/resources/struts.properties
trunk/vradi-web/src/main/webapp/index.html
trunk/vradi-web/src/main/webapp/jsp/
trunk/vradi-web/src/main/webapp/jsp/forgotPassword.jsp
trunk/vradi-web/src/main/webapp/jsp/home.jsp
trunk/vradi-web/src/main/webapp/jsp/login.jsp
trunk/vradi-web/src/main/webapp/jsp/register.jsp
Removed:
trunk/vradi-web/src/main/webapp/index.jsp
Modified:
trunk/pom.xml
trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/MailingManager.java
trunk/vradi-services/src/main/java/org/chorem/vradi/services/tasks/ImportXmlStreamTasks.java
trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java
trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java
trunk/vradi-web/pom.xml
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java
trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/resources/struts.xml
trunk/vradi-web/src/main/resources/vradi-web.properties
trunk/vradi-web/src/main/webapp/WEB-INF/web.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/pom.xml 2011-05-20 14:08:45 UTC (rev 32)
@@ -114,7 +114,7 @@
<nuitonI18nVersion>2.4</nuitonI18nVersion>
<nuitonWidgetVersion>1.1.1</nuitonWidgetVersion>
<generatorPluginVersion>2.3.3</generatorPluginVersion>
- <wikittyVersion>3.1.2</wikittyVersion>
+ <wikittyVersion>3.1.3-SNAPSHOT</wikittyVersion>
<oooVersion>3.2.1</oooVersion>
<javamailVersion>1.4.3</javamailVersion>
<slf4jVersion>1.6.1</slf4jVersion>
Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/MailingManager.java
===================================================================
--- trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/MailingManager.java 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/MailingManager.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -149,53 +149,8 @@
}
return null;
}
- String result;
- // TODO EC-20100505 use Session.getDefaultInstance()
- // and common Properties form receiving/sending mails !
- Properties props = new Properties();
- props.put("mail.smtp.host", VradiServiceConfigurationHelper.getSmtpHost(config));
- props.put("mail.smtp.port", VradiServiceConfigurationHelper.getSmtpPort(config));
- //props.put("mail.smtp.auth", "true");
- //props.put("mail.smtp.socketFactory.port", config.getSmtpPort());
- //props.put("mail.smtp.socketFactory.class", SSL_FACTORY);
- //props.put("mail.smtp.socketFactory.fallback", "false");
- //props.put("mail.debug", config.isMailDebug());
-
- Session session = Session.getInstance(props,
- new Authenticator() {
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(
- VradiServiceConfigurationHelper.getMailUser(config),
- VradiServiceConfigurationHelper.getMailPassword(config));
- }
- });
-
- // EC-20100427 : attention, ca affiche le contenu des pdf joint
- // c'est absolument illisible
- //session.setDebug(log.isDebugEnabled());
-
- // create a message
- MimeMessage msg = new MimeMessage(session);
-
try {
- // set the from and to address
- InternetAddress addressFrom = new InternetAddress(
- VradiServiceConfigurationHelper.getMailFrom(config),
- VradiServiceConfigurationHelper.getMailFromName(config));
-
- msg.setFrom(addressFrom);
-
- InternetAddress addressTo = new InternetAddress(recipient);
- msg.addRecipient(Message.RecipientType.TO, addressTo);
-
- if (receptionProof) {
- // Optional : You can also set your custom headers in the Email if you Want
- msg.addHeader("Return-Receipt-To", VradiServiceConfigurationHelper.getMailFrom(config));
- msg.addHeader("Disposition-Notification-To", VradiServiceConfigurationHelper.getMailFrom(config));
- }
-
Multipart multiparts = new MimeMultipart();
// create the message part
@@ -263,6 +218,106 @@
}
}
+ return postMail(config, recipient, subject, receptionProof, multiparts);
+ } catch (MessagingException eee) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't generate message", eee);
+ }
+ throw new VradiException(_("vradi.error.sending.send", eee.getMessage()));
+ }
+ }
+
+ /**
+ * Sends an email to the specified recipient with the specified subject
+ * and the specified message and the specified forms PDF.
+ *
+ * @param recipient the email address of the recipient
+ * @param subject mail subject
+ * @param receptionProof if true, ask for a reception proof
+ * @param msg content of mail
+ * @return the message id of the email sent
+ * @throws VradiException
+ */
+ public static String postMail(ApplicationConfig config, String recipient, String subject,
+ boolean receptionProof,
+ String msg) throws MessagingException, VradiException {
+
+ Multipart multiparts = new MimeMultipart();
+
+ // create the message part
+ MimeBodyPart msgBodyPart = new MimeBodyPart();
+ msgBodyPart.setText(msg);
+ multiparts.addBodyPart(msgBodyPart);
+
+ return postMail(config, recipient, subject, receptionProof, multiparts);
+ }
+
+ /**
+ * Sends an email to the specified recipient with the specified subject
+ * and the specified message and the specified forms PDF.
+ *
+ * @param recipient the email address of the recipient
+ * @param subject mail subject
+ * @param receptionProof if true, ask for a reception proof
+ * @param multiparts content of mail
+ * @return the message id of the email sent
+ * @throws VradiException
+ */
+ public static String postMail(ApplicationConfig config, String recipient, String subject,
+ boolean receptionProof,
+ Multipart multiparts) throws VradiException {
+
+ if (StringUtils.isBlank(recipient)) {
+ if (log.isWarnEnabled()) {
+ log.warn(_("Nothing to send : %s", recipient));
+ }
+ return null;
+ }
+ String result;
+
+ // TODO EC-20100505 use Session.getDefaultInstance()
+ // and common Properties form receiving/sending mails !
+ Properties props = new Properties();
+ props.put("mail.smtp.host", VradiServiceConfigurationHelper.getSmtpHost(config));
+ props.put("mail.smtp.port", VradiServiceConfigurationHelper.getSmtpPort(config));
+ //props.put("mail.smtp.auth", "true");
+ //props.put("mail.smtp.socketFactory.port", config.getSmtpPort());
+ //props.put("mail.smtp.socketFactory.class", SSL_FACTORY);
+ //props.put("mail.smtp.socketFactory.fallback", "false");
+ //props.put("mail.debug", config.isMailDebug());
+
+ final String mailUser = VradiServiceConfigurationHelper.getMailUser(config);
+ final String mailPassword = VradiServiceConfigurationHelper.getMailPassword(config);
+ Session session = Session.getInstance(props,
+ new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(
+ mailUser,
+ mailPassword);
+ }
+ });
+
+ // create a message
+ MimeMessage msg = new MimeMessage(session);
+
+ try {
+ // set the from and to address
+ InternetAddress addressFrom = new InternetAddress(
+ VradiServiceConfigurationHelper.getMailFrom(config),
+ VradiServiceConfigurationHelper.getMailFromName(config));
+
+ msg.setFrom(addressFrom);
+
+ InternetAddress addressTo = new InternetAddress(recipient);
+ msg.addRecipient(Message.RecipientType.TO, addressTo);
+
+ if (receptionProof) {
+ // Optional : You can also set your custom headers in the Email if you Want
+ msg.addHeader("Return-Receipt-To", VradiServiceConfigurationHelper.getMailFrom(config));
+ msg.addHeader("Disposition-Notification-To", VradiServiceConfigurationHelper.getMailFrom(config));
+ }
+
// Put parts in message
msg.setContent(multiparts);
@@ -303,7 +358,6 @@
}
return result;
}
-
/**
* Receives the emails and check if some are error emails or reception proofs
* and treat them in consequence.
Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/tasks/ImportXmlStreamTasks.java
===================================================================
--- trunk/vradi-services/src/main/java/org/chorem/vradi/services/tasks/ImportXmlStreamTasks.java 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/tasks/ImportXmlStreamTasks.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -32,25 +32,14 @@
import org.chorem.vradi.entities.XmlStream;
import org.chorem.vradi.services.VradiException;
import org.chorem.vradi.services.managers.BindingManager;
+import org.chorem.vradi.services.managers.MailingManager;
import org.nuiton.util.ApplicationConfig;
import org.nuiton.util.ExceptionUtil;
import org.nuiton.util.TimeLog;
import org.nuiton.wikitty.WikittyProxy;
-import javax.mail.Authenticator;
-import javax.mail.Message;
import javax.mail.MessagingException;
-import javax.mail.Multipart;
-import javax.mail.PasswordAuthentication;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeBodyPart;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
-import java.io.UnsupportedEncodingException;
import java.util.List;
-import java.util.Properties;
import java.util.TimerTask;
import static org.nuiton.i18n.I18n._;
@@ -139,74 +128,19 @@
}
return;
}
+ String msg = _("vradi.error.errorImportXmlStream", xmlStream.getName(),
+ ExceptionUtil.stackTrace(error));
- // TODO EC-20100505 use Session.getDefaultInstance()
- // and common Properties form receiving/sending mails !
- Properties props = new Properties();
- props.put("mail.smtp.host", VradiServiceConfigurationHelper.getSmtpHost(config));
- props.put("mail.smtp.port", VradiServiceConfigurationHelper.getSmtpPort(config));
- //props.put("mail.smtp.auth", "true");
- //props.put("mail.smtp.socketFactory.port", config.getSmtpPort());
- //props.put("mail.smtp.socketFactory.class", SSL_FACTORY);
- //props.put("mail.smtp.socketFactory.fallback", "false");
- //props.put("mail.debug", config.isMailDebug());
+ // Setting the Subject and Content Type
+ String subject = _("vradi.error.errorImportXmlStream.subject", xmlStream.getName());
- Session session = Session.getInstance(props,
- new Authenticator() {
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(
- VradiServiceConfigurationHelper.getMailUser(config),
- VradiServiceConfigurationHelper.getMailPassword(config));
- }
- });
-
- // EC-20100427 : attention, ca affiche le contenu des pdf joint
- // c'est absolument illisible
- //session.setDebug(log.isDebugEnabled());
-
- // create a message
- MimeMessage msg = new MimeMessage(session);
-
try {
- // set the from and to address
- InternetAddress addressFrom = new InternetAddress(VradiServiceConfigurationHelper.getMailFrom(config),
- VradiServiceConfigurationHelper.getMailFromName(config));
-
- msg.setFrom(addressFrom);
-
- InternetAddress addressTo = new InternetAddress(email);
- msg.addRecipient(Message.RecipientType.TO, addressTo);
-
- Multipart multiparts = new MimeMultipart();
-
- // create the message part
- MimeBodyPart msgBodyPart = new MimeBodyPart();
- msgBodyPart.setText(_("vradi.error.errorImportXmlStream", xmlStream.getName(),
- ExceptionUtil.stackTrace(error)));
-
- multiparts.addBodyPart(msgBodyPart);
-
- // Put parts in message
- msg.setContent(multiparts);
-
- // Setting the Subject and Content Type
- msg.setSubject(_("vradi.error.errorImportXmlStream.subject", xmlStream.getName()));
-
- try {
- Transport.send(msg);
- } catch (MessagingException eee) {
- if (log.isErrorEnabled()) {
- log.error("Cant send mail", eee);
- }
- }
-
-
+ MailingManager.postMail(config, email, subject, false, msg);
} catch (MessagingException eee) {
if (log.isErrorEnabled()) {
log.error("Can't generate message", eee);
}
- } catch (UnsupportedEncodingException eee) {
+ } catch (VradiException eee) {
if (log.isErrorEnabled()) {
log.error("Can't generate message", eee);
}
Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java
===================================================================
--- trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-swing/src/main/java/org/chorem/vradi/VradiConfig.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -73,12 +73,12 @@
// Creating instance of ApplicationConfig
config = new ApplicationConfig(VradiSwingOption.CONFIG_FILE.getDefaultValue());
+ // Load wikitty options
+ config.loadDefaultOptions(WikittyConfigOption.class);
+
// Load service options
config.loadDefaultOptions(VradiServiceConfiguration.VradiServiceOption.class);
- // Load wikitty options
- config.loadDefaultOptions(WikittyConfigOption.class);
-
// Load vradi options
config.loadDefaultOptions(VradiSwingOption.class);
Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java
===================================================================
--- trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -28,6 +28,8 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.vradi.VradiConfigHelper;
import org.nuiton.util.ApplicationConfig;
+import org.nuiton.wikitty.WikittyConfig;
+import org.nuiton.wikitty.WikittyConfigOption;
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.WikittyService;
import org.nuiton.wikitty.WikittyServiceFactory;
Modified: trunk/vradi-web/pom.xml
===================================================================
--- trunk/vradi-web/pom.xml 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/pom.xml 2011-05-20 14:08:45 UTC (rev 32)
@@ -137,6 +137,12 @@
</dependency>
<dependency>
+ <groupId>org.nuiton.wikitty</groupId>
+ <artifactId>wikitty-hessian-client</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>runtime</scope>
@@ -173,6 +179,7 @@
</dependencies>
<build>
+
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -205,13 +212,8 @@
</userRulesFiles>
<namespaces>
<s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s>
- <sx>
- http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
- </sx>
+ <sx>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</sx>
<jsp>http://java.sun.com/JSP/Page</jsp>
- <decorator>
- http://www.opensymphony.com/sitemesh/decorator
- </decorator>
</namespaces>
</configuration>
</execution>
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -1,15 +1,19 @@
package org.chorem.vradi;
+import java.util.Locale;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.vradi.entities.VradiUser;
+import org.nuiton.i18n.I18n;
+import org.nuiton.i18n.init.DefaultI18nInitializer;
import org.nuiton.util.ApplicationConfig;
+import org.nuiton.wikitty.WikittyConfigOption;
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.WikittyService;
import org.nuiton.wikitty.WikittyServiceFactory;
-import org.nuiton.wikitty.entities.WikittyUser;
/**
* Classe utilisee pour stocker les objets utils en session utilisateur
@@ -28,18 +32,28 @@
static final private String VRADI_SESSION_KEY = VradiSession.class.getSimpleName();
protected WikittyProxy proxy;
- private WikittyUser user;
+ protected ApplicationConfig config;
+ private VradiUser user;
public VradiSession() {
- ApplicationConfig config = VradiWebConfig.getConfig();
+ config = VradiWebConfig.getConfig();
+
+ // Init wikitty service
WikittyService ws = WikittyServiceFactory.buildWikittyService(config);
proxy = new WikittyProxy(config, ws);
+
+ // init I18n
+// I18n.init(new DefaultI18nInitializer("vradi-i18n"), null);
}
- static public void invalidate(Map<String, Object> session) {
- session.remove(VRADI_SESSION_KEY);
+ public void invalidate() {
+ this.user = null;
}
+ public ApplicationConfig getConfig() {
+ return config;
+ }
+
static public VradiSession getVradiSession(HttpServletRequest request) {
HttpSession session = request.getSession();
VradiSession result = getVradiSession(session);
@@ -68,7 +82,11 @@
return proxy;
}
- public WikittyUser getUser() {
+ public VradiUser getUser() {
return user;
}
+
+ public void setUser(VradiUser user) {
+ this.user = user;
+ }
}
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -38,12 +38,12 @@
// Creating instance of ApplicationConfig
config = new ApplicationConfig(VradiWebOption.CONFIG_FILE.getDefaultValue());
+ // Load wikitty options
+ config.loadDefaultOptions(WikittyConfigOption.class);
+
// Load service options
config.loadDefaultOptions(VradiServiceConfiguration.VradiServiceOption.class);
- // Load wikitty options
- config.loadDefaultOptions(WikittyConfigOption.class);
-
// Load vradi options
config.loadDefaultOptions(VradiWebOption.class);
@@ -80,7 +80,7 @@
CONFIG_FILE(
ApplicationConfig.CONFIG_FILE_NAME,
_("vradi.config.configFileName.description"),
- "vradi.properties", String.class, true, true),
+ "vradi-web.properties", String.class, true, true),
VRADI_VERSION(
"vradi.version",
@@ -108,7 +108,7 @@
REMOTE_ENDPOINT(
"vradi.remote.endpoint",
_("vradi.config.remote.endpoint.description"),
- "", String.class, false, false);
+ "http://localhost:8080", String.class, false, false);
public String key;
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ForgotPasswordAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ForgotPasswordAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ForgotPasswordAction.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,105 @@
+package org.chorem.vradi.actions;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.AddressException;
+
+import org.apache.commons.lang.RandomStringUtils;
+import org.chorem.vradi.entities.VradiUser;
+import org.chorem.vradi.services.managers.MailingManager;
+import org.nuiton.util.StringUtil;
+import org.nuiton.wikitty.search.Criteria;
+import org.nuiton.wikitty.WikittyProxy;
+import org.nuiton.wikitty.search.Search;
+
+import static org.nuiton.i18n.I18n.n_;
+
+/**
+ * Genere un nouveau mot de passe pour l'utilisateur et lui envoie par mail
+ * TODO poussin 20110211 il faudrait ajouter une securite pour eviter que
+ * quelqu'un s'amuse a demander la modification de password de quelqu'un d'autre
+ * toutes les 2s
+ * - soit en ne permettant l'envoi qu'une fois par jour
+ * - soit ????
+ *
+ * @author poussin
+ */
+public class ForgotPasswordAction extends VradiBaseAction {
+ private static final long serialVersionUID = -8207951465957204954L;
+ protected String email;
+
+ /**
+ * @return the email
+ */
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * @param email the email to set
+ */
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ /**
+ * Generates a new password and sends it to the user
+ */
+ public String execute() {
+ String result = INPUT;
+
+ try {
+ if (email != null) {
+ email = email.trim();
+ if (!email.isEmpty()) {
+ WikittyProxy proxy = getProxy();
+ Criteria criteria = Search.query()
+ .eq(VradiUser.FQ_FIELD_WIKITTYUSER_LOGIN, email).criteria();
+ VradiUser user = proxy.findByCriteria(VradiUser.class, criteria);
+
+ if (user != null) { //If the email address exists
+ String password = "";
+ String md5 = "";
+
+ password = RandomStringUtils.randomAlphanumeric(20);
+ md5 = StringUtil.encodeMD5(password);
+ try {
+ String mailContent;
+
+ mailContent = getText(n_("vradi.register.mailHi")) +
+ ",\n\n" + getText(n_("vradi.register.mailPwd")) + ": " +
+ password + "\n\n" + getText(n_("vradi.register.mailEmail")) +
+ ": " + email + "\n\n";
+ MailingManager.postMail(getConfig(), email,
+ getText(n_("vradi.register.mailSubject")),
+ false,
+ mailContent);
+
+ //The password is changed only if the mail has been sent
+ user.setPassword(md5);
+ proxy.store(user);
+ } catch (AddressException e) {
+ //If the email address is invalid
+ String message = getText("vradi.mail.badFormat");
+
+ addActionError(n_(message));
+ log.error(message + " (email:" + email + ")", e);
+ } catch (MessagingException e) {
+ String message = getText("vradi.mail.sendError");
+
+ addActionError(n_(message));
+ log.error(message + "(" + e.getMessage() + ")", e);
+ }
+ result = SUCCESS;
+ } else { //If the email is not associated with an account
+ addFieldError("email",
+ getText(n_("vradi.forgotPassword.emailDoesntExist")));
+ }
+ }
+ }
+ } catch (Exception e) {
+ addActionError(getText(n_("vradi.error.internal")));
+ log.error(e.getMessage(), e);
+ }
+ return result;
+ }
+}
\ No newline at end of file
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/HomeAction.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,18 @@
+package org.chorem.vradi.actions;
+
+/**
+ * Prepare l'affichage de la page d'accueil
+ *
+ * @author poussin
+ */
+public class HomeAction extends VradiBaseAction {
+
+ private static final long serialVersionUID = -3735250067223062719L;
+
+ /**
+ * Initializes everything before displaying the home page
+ */
+ public String execute() {
+ return SUCCESS;
+ }
+}
\ No newline at end of file
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LoginAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LoginAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LoginAction.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,84 @@
+package org.chorem.vradi.actions;
+
+import org.chorem.vradi.entities.VradiUser;
+import org.nuiton.util.StringUtil;
+import org.nuiton.wikitty.search.Criteria;
+import org.nuiton.wikitty.WikittyProxy;
+import org.nuiton.wikitty.search.Search;
+
+import static org.nuiton.i18n.I18n.n_;
+
+/**
+ * authentifie l'utilisateur et place son objet User dans la vradi session
+ *
+ * @author poussin
+ */
+public class LoginAction extends VradiBaseAction {
+
+ private static final long serialVersionUID = 6891064800288772246L;
+
+ protected String email;
+ protected String password;
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * Check password in solr index, if fail try to check password admin in config file
+ *
+ * @param email email login
+ * @param password password
+ * @return null if not found
+ */
+ protected VradiUser checkLogin(String email, String password) {
+ VradiUser result = null;
+ if (email != null && password != null) {
+ if (!email.isEmpty() && !password.equals(StringUtil.encodeMD5(""))) {
+ WikittyProxy proxy = getProxy();
+ Criteria criteria = Search.query().eq(VradiUser.FQ_FIELD_WIKITTYUSER_LOGIN, email).
+ eq(VradiUser.FQ_FIELD_WIKITTYUSER_PASSWORD, password).criteria();
+ result = proxy.findByCriteria(VradiUser.class, criteria);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Authenticates the user if his email and password are valid
+ */
+ public String execute() {
+ String result = INPUT;
+
+ try {
+ if (email != null) {
+ email = email.trim();
+
+ if (password != null) {
+ String md5 = StringUtil.encodeMD5(password);
+ VradiUser user = checkLogin(email, md5);
+ if (user != null) {
+ getVradiSession().setUser(user);
+ result = SUCCESS;
+ }
+ }
+ }
+ } catch (Exception e) {
+ addActionError(getText(n_("vradi.error.internal")));
+ log.error(e.getMessage(), e);
+ }
+ return result;
+ }
+}
\ No newline at end of file
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LogoutAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LogoutAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/LogoutAction.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,11 @@
+package org.chorem.vradi.actions;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: letellier
+ * Date: 19/05/11
+ * Time: 12:05
+ * To change this template use File | Settings | File Templates.
+ */
+public class LogoutAction {
+}
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RegisterAction.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,160 @@
+package org.chorem.vradi.actions;
+
+import javax.mail.MessagingException;
+import javax.mail.internet.AddressException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.chorem.vradi.entities.VradiUser;
+import org.chorem.vradi.entities.VradiUserImpl;
+import org.chorem.vradi.services.managers.MailingManager;
+import org.nuiton.util.StringUtil;
+import org.nuiton.wikitty.search.Criteria;
+import org.nuiton.wikitty.WikittyProxy;
+import org.nuiton.wikitty.search.Search;
+
+import static org.nuiton.i18n.I18n.n_;
+
+/**
+ * Enregistre un nouvel utilisateur
+ *
+ * @author poussin
+ */
+public class RegisterAction extends VradiBaseAction implements ServletRequestAware {
+ private static final long serialVersionUID = 2204772861770399542L;
+ protected String email;
+ protected String password;
+ protected String repeatPassword;
+ protected HttpServletRequest request;
+
+ /**
+ * @return the email
+ */
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * @param email the email to set
+ */
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ /**
+ * @return the password
+ */
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * @param password the password to set
+ */
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ /**
+ * @return the repeatPassword
+ */
+ public String getRepeatPassword() {
+ return repeatPassword;
+ }
+
+ /**
+ * @param repeatPassword the repeatPassword to set
+ */
+ public void setRepeatPassword(String repeatPassword) {
+ this.repeatPassword = repeatPassword;
+ }
+
+ @Override
+ public void setServletRequest(HttpServletRequest request) {
+ this.request = request;
+ }
+
+ /**
+ *
+ * @param passwordMD5 the user password hashed in md5
+ * @return false if the email address isn't already registered, true
+ * otherwise
+ */
+ protected boolean alreadyRegistered(String passwordMD5) {
+ boolean result = true;
+
+ if (email != null && passwordMD5 != null) {
+ if (!email.isEmpty() && !passwordMD5.equals(StringUtil.encodeMD5(""))) {
+ WikittyProxy proxy = getProxy();
+ Criteria criteria = Search.query().eq(VradiUser.FQ_FIELD_WIKITTYUSER_LOGIN, email).criteria(); //Retrieves user by user name (email)
+
+ //If the user doesn't already exist
+ if (proxy.findByCriteria(VradiUser.class, criteria) == null) {
+ result = false;
+ } else { //The email address is already used by someone
+ addFieldError("email", getText(n_("vradi.register.emailAldyUsed")));
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Registers the new user and sends an email to confirm registration
+ */
+ public String execute() {
+ String result = INPUT;
+
+ try {
+ if (email != null) {
+ email = email.trim();
+ if (password != null) {
+ if (!password.equals(repeatPassword)) {
+ addActionError(getText(n_("vradi.register.pwdDontMatch")));
+ } else {
+ String md5 = StringUtil.encodeMD5(password);
+
+ //If the email address isn't already used
+ if (!alreadyRegistered(md5)) {
+ WikittyProxy proxy = getProxy();
+ VradiUserImpl newUser = new VradiUserImpl();
+ newUser.setPassword(md5);
+ newUser.setLogin(email);
+ VradiUser login = proxy.store(newUser); //Stores the new user
+
+ //If there was an error when storing the user
+ if (login == null) {
+ addFieldError("email", getText(n_("vradi.register.invalidLogin")));
+ } else {
+ getVradiSession().setUser(login);
+
+ try {
+ String mailContent;
+
+ mailContent = getText(n_("vradi.register.mailHi")) + ",\n\n" + getText(n_("vradi.register.mailPwd")) + ": " + password + "\n\n" + getText(n_("bow.register.mailEmail")) + ": " + email + "\n\n";
+ MailingManager.postMail(getConfig(), email, getText(n_("vradi.register.mailSubject")), false, mailContent);
+ } catch (AddressException e) {
+ //If the email address is invalid
+ String message = getText("vradi.mail.badFormat");
+
+ addActionError(n_(message));
+ log.error(message + " (email:" + email + ")", e);
+ } catch (MessagingException e) {
+ String message = getText("vradi.mail.sendError");
+
+ addActionError(n_(message));
+ log.error(message + "(" + e.getMessage() + ")", e);
+ }
+ result = SUCCESS;
+ }
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ addActionError(getText(n_("vradi.error.internal")));
+ log.error(e.getMessage(), e);
+ }
+ return result;
+ }
+}
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,124 @@
+package org.chorem.vradi.actions;
+
+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;
+import java.util.List;
+import java.util.Map;
+import org.apache.struts2.interceptor.SessionAware;
+import org.chorem.vradi.VradiSession;
+import org.nuiton.util.ApplicationConfig;
+import org.nuiton.wikitty.WikittyProxy;
+
+/**
+ * TODO sletellier 20110519 : move this method to nuiton utils web
+ *
+ * Base class which must be extended by every action
+ * Overrides the Struts2 methods to render text in order to explicitly show
+ * the missing i18n translations
+ * Allows access to the session and the proxy
+ */
+public class VradiBaseAction extends ActionSupport implements SessionAware {
+
+ private static final long serialVersionUID = 1L;
+
+ protected static final Log log = LogFactory.getLog(VradiBaseAction.class);
+
+ public static final String UNTRANSLATED_MARKER = "???";
+
+ protected Map<String, Object> session;
+
+ public VradiSession getVradiSession() {
+ VradiSession result = VradiSession.getVradiSession(session);
+ return result;
+ }
+
+ public WikittyProxy getProxy() {
+ WikittyProxy result = getVradiSession().getProxy();
+ return result;
+ }
+
+ public ApplicationConfig getConfig() {
+ return getVradiSession().getConfig();
+ }
+
+ @Override
+ public void setSession(Map<String, Object> session) {
+ this.session = session;
+ }
+
+ @Override
+ public String getText(String aTextName) {
+ String value = super.getText(aTextName);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String aTextName, String defaultValue) {
+ String value = super.getText(aTextName, defaultValue);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String aTextName, String defaultValue, String obj) {
+ String value = super.getText(aTextName, defaultValue, obj);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String aTextName, List<?> args) {
+ String value = super.getText(aTextName, args);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String key, String[] args) {
+ String value = super.getText(key, args);
+ return getSafeText(key, value);
+ }
+
+ @Override
+ public String getText(String aTextName, String defaultValue, List<?> args) {
+ String value = super.getText(aTextName, defaultValue, args);
+ return getSafeText(aTextName, value);
+ }
+
+ @Override
+ public String getText(String key, String defaultValue, String[] args) {
+ String value = super.getText(key, defaultValue, args);
+ return getSafeText(key, value);
+ }
+
+ @Override
+ public String getText(String key, String defaultValue, List<?> args,
+ ValueStack stack) {
+ String value = super.getText(key, defaultValue, args, stack);
+ return getSafeText(key, value);
+ }
+
+ @Override
+ public String getText(String key, String defaultValue, String[] args,
+ ValueStack stack) {
+ String value = super.getText(key, defaultValue, args, stack);
+ return getSafeText(key, value);
+ }
+
+ /**
+ * Surrounds the non translated keys with a marker to make them visible
+ *
+ * @param key i18n key
+ * @param value text to check
+ * @return translated text
+ */
+ 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;
+ }
+}
\ No newline at end of file
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LoginInterceptor.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,46 @@
+package org.chorem.vradi.interceptors;
+
+import java.util.Map;
+
+import org.apache.struts2.ServletActionContext;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.chorem.vradi.VradiSession;
+import org.chorem.vradi.entities.VradiUser;
+
+/**
+ * Interceptor used to loginRedirect a non-logged user if he tries to access a page
+ * where logging is mandatory
+ */
+public class LoginInterceptor extends AbstractInterceptor {
+ private static final long serialVersionUID = -7520186185205372272L;
+
+ protected String loginRedirect;
+
+ /**
+ * @param loginRedirect the loginRedirect to set
+ */
+ public void setLoginRedirect(String loginRedirect) {
+ this.loginRedirect = loginRedirect;
+ }
+
+ @Override
+ public String intercept(ActionInvocation invocation) throws Exception {
+ Map<String, Object> session = ActionContext.getContext().getSession();
+
+ VradiSession vradiSession = VradiSession.getVradiSession(session);
+ VradiUser user = vradiSession.getUser();
+ String result = null;
+
+ //If the user isn't logged in
+ if (user == null) {
+ ServletActionContext.getResponse().sendRedirect(loginRedirect);
+ } else {
+ result = invocation.invoke();
+ }
+
+ return result;
+ }
+}
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LogoutInterceptor.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LogoutInterceptor.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/interceptors/LogoutInterceptor.java 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,23 @@
+package org.chorem.vradi.interceptors;
+
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.chorem.vradi.VradiSession;
+
+/**
+ * Interceptor used to remove all trace of user in session. Used for login page
+ */
+public class LogoutInterceptor extends AbstractInterceptor {
+ private static final long serialVersionUID = -7520186185205372272L;
+
+ @Override
+ public String intercept(ActionInvocation invocation) throws Exception {
+ Map<String, Object> session = ActionContext.getContext().getSession();
+ VradiSession.getVradiSession(session).invalidate();
+ String result = invocation.invoke();
+ return result;
+ }
+}
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-05-20 14:08:45 UTC (rev 32)
@@ -3,4 +3,22 @@
vradi.config.last.version.description=Last started version
vradi.config.remote.endpoint.description=Url of vradi service
vradi.config.ui.locale=Vradi web locale
-vradi.config.version.description=Vradi web version
\ No newline at end of file
+vradi.config.version.description=Vradi web version
+vradi.register.emailAldyUsed=This address mail is already used
+vradi.register.invalidLogin=An error occured during login
+vradi.register.pwdDontMatch=Both passwords doesn't matches
+vradi.error.internal=Error occured, thaks contact an admin
+vradi.forgotPassword.emailDoesntExist=This email address doesn't exist
+vradi.forgotpwd.submit=Send
+vradi.forgotpwd.title=You are forgotten your password ?
+vradi.login.email=Email
+vradi.login.password=Password
+vradi.login.repeatPassword=Confirm
+vradi.login.submit=Please retape your password
+vradi.login.title=Connection
+vradi.register.mailEmail=Your email
+vradi.register.mailHi=Hello
+vradi.register.mailPwd=Your password
+vradi.register.mailSubject=[Vradi] Your user informations
+vradi.register.submit=Login
+vradi.register.title=Login
\ No newline at end of file
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-20 14:08:45 UTC (rev 32)
@@ -1,3 +1,4 @@
+bow.register.mailEmail=
vradi.config.configFileName.description=Fichier de configuration de Vradi web
vradi.config.database.version.description=Version de la base de donnée
vradi.config.last.version.description=Dernière version de Vradi web lancée
@@ -4,3 +5,21 @@
vradi.config.remote.endpoint.description=Url de l'addresse de Vradi service
vradi.config.ui.locale=Locale de l'instance de Vradi web
vradi.config.version.description=Version de Vradi web
+vradi.error.internal=Une erreur interne est survenue, merci de contacter un administrateur si cette erreur persiste
+vradi.forgotPassword.emailDoesntExist=Cette adresse email n''existe pas
+vradi.forgotpwd.submit=Envoyer
+vradi.forgotpwd.title=Vous avez oublié votre mot de passe ?
+vradi.login.email=Email
+vradi.login.password=Mot de passe
+vradi.login.repeatPassword=Confiramtion
+vradi.login.submit=Veuillez retaper votre mot de passe
+vradi.login.title=Connection
+vradi.register.emailAldyUsed=Cette adresse email est déjà utilisée
+vradi.register.invalidLogin=Une erreur s''est produite pendant l''enregistrement de vos informations, merci d''essayer à nouveau
+vradi.register.mailEmail=Votre email
+vradi.register.mailHi=Bonjour
+vradi.register.mailPwd=Votre mot de passe
+vradi.register.mailSubject=[Vradi] Vos informations utilisateurs
+vradi.register.pwdDontMatch=Les mots de passe sont différents
+vradi.register.submit=S''enregistrer
+vradi.register.title=S''enregistrer
Added: trunk/vradi-web/src/main/resources/struts.properties
===================================================================
--- trunk/vradi-web/src/main/resources/struts.properties (rev 0)
+++ trunk/vradi-web/src/main/resources/struts.properties 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,45 @@
+struts.locale=fr_FR
+struts.i18n.encoding=UTF-8
+
+# struts.multipart.parser=cos
+# struts.multipart.parser=pell
+struts.multipart.parser=jakarta
+# uses javax.servlet.context.tempdir by default
+struts.multipart.saveDir=
+struts.multipart.maxSize=2097152
+
+# struts.custom.properties=application,com/webwork/extension/custom
+
+#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper
+
+struts.action.extension=action
+
+struts.serve.static=true
+
+struts.serve.static.browserCache=true
+
+struts.tag.altSyntax=true
+
+struts.devMode=true
+
+struts.i18n.reload=true
+
+struts.ui.theme=xhtml
+struts.ui.templateDir=template
+#sets the default template type. Either ftl, vm, or jsp
+struts.ui.templateSuffix=ftl
+
+struts.configuration.xml.reload=false
+
+struts.url.http.port = 80
+struts.url.https.port = 443
+
+struts.custom.i18n.resources=vradi-web-i18n
+
+struts.dispatcher.parametersWorkaround = false
+
+#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager
+
+struts.freemarker.wrapper.altMap=true
+
+struts.xslt.nocache=false
Modified: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-05-20 14:08:45 UTC (rev 32)
@@ -1,28 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- #%L
- bow
- $Id: struts.xml 276 2011-04-29 21:02:55Z bpoussin $
- $HeadURL: http://svn.chorem.org/svn/bow/trunk/bow-ui/src/main/resources/struts.xml $
- %%
- Copyright (C) 2010 - 2011 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- 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 Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- -->
-
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
@@ -38,10 +15,7 @@
<package name="publicArea" extends="struts-default">
<interceptors>
<interceptor-stack name="publicAreaStack">
- <interceptor-ref name="defaultStack">
- <param name="store.operationMode">AUTOMATIC</param>
- <param name="fileUpload.allowedExtensions">.html</param>
- </interceptor-ref>
+ <interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="publicAreaStack"/>
@@ -51,50 +25,58 @@
| Definition d'un package pour l'espace des page de login
| - ajout de l'intercepteur qui verifie que la personne est bien identifiee
+-->
- <!--<package name="loginArea" extends="publicArea">-->
- <!--<interceptors>-->
- <!--<interceptor name="logout" class="org.chorem.bow.interceptor.LogoutInterceptor"/>-->
- <!--<interceptor-stack name="loginAreaStack">-->
- <!--<interceptor-ref name="logout"/>-->
- <!--<interceptor-ref name="publicAreaStack"/>-->
- <!--</interceptor-stack>-->
- <!--</interceptors>-->
- <!--<default-interceptor-ref name="loginAreaStack"/>-->
- <!--</package>-->
+ <package name="loginArea" extends="publicArea">
+ <interceptors>
+ <interceptor name="logout" class="org.chorem.vradi.interceptors.LogoutInterceptor"/>
+ <interceptor-stack name="loginAreaStack">
+ <interceptor-ref name="logout"/>
+ <interceptor-ref name="publicAreaStack"/>
+ </interceptor-stack>
+ </interceptors>
+ <default-interceptor-ref name="loginAreaStack"/>
+ </package>
<!--
| Definition d'un package pour l'espace prive
| - ajout de l'intercepteur qui verifie que la personne est bien identifiee
+-->
- <!--<package name="restrictedArea" extends="publicArea">-->
- <!--<interceptors>-->
- <!--<interceptor name="login" class="org.chorem.bow.interceptor.LoginInterceptor">-->
- <!--<param name="redirect">login_input.action</param>-->
- <!--</interceptor>-->
- <!--<interceptor-stack name="restrictedAreaStack">-->
- <!--<interceptor-ref name="login"/>-->
- <!--<interceptor-ref name="publicAreaStack"/>-->
- <!--</interceptor-stack>-->
- <!--</interceptors>-->
- <!--<default-interceptor-ref name="restrictedAreaStack"/>-->
- <!--</package>-->
+ <package name="restrictedArea" extends="publicArea">
+ <interceptors>
+ <interceptor name="login" class="org.chorem.vradi.interceptors.LoginInterceptor">
+ <param name="loginRedirect">login.action</param>
+ </interceptor>
+ <interceptor-stack name="restrictedAreaStack">
+ <interceptor-ref name="login"/>
+ <interceptor-ref name="publicAreaStack"/>
+ </interceptor-stack>
+ </interceptors>
+ <default-interceptor-ref name="restrictedAreaStack"/>
+ </package>
- <!--<package name="login" extends="loginArea">-->
- <!--<action name="register_*" method="{1}" class="org.chorem.bow.action.RegisterAction">-->
- <!--<result name="input">/jsp/register.jsp</result>-->
- <!--<result type="redirectAction">home</result>-->
- <!--</action>-->
- <!--<action name="forgotPassword_*" method="{1}" class="org.chorem.bow.action.ForgotPasswordAction">-->
- <!--<result name="input">/jsp/forgotPassword.jsp</result>-->
- <!--<result type="redirectAction">login_input</result>-->
- <!--</action>-->
- <!--<action name="login_*" method="{1}" class="org.chorem.bow.action.LoginAction">-->
- <!--<result name="input">/jsp/login.jsp</result>-->
- <!--<result name="login" type="redirectAction">home</result>-->
- <!--<result type="redirectAction">home</result>-->
- <!--</action>-->
- <!--<action name="logout" class="org.chorem.bow.action.LogoutAction">-->
- <!--<result type="redirectAction">login_input</result>-->
- <!--</action>-->
- <!--</package>-->
+ <package name="login" extends="loginArea">
+ <action name="register_*" method="{1}" class="org.chorem.vradi.actions.RegisterAction">
+ <result name="input">/jsp/register.jsp</result>
+ <result type="redirectAction">home</result>
+ </action>
+ <action name="forgotPassword_*" method="{1}" class="org.chorem.vradi.actions.ForgotPasswordAction">
+ <result name="input">/jsp/forgotPassword.jsp</result>
+ <result type="redirectAction">login_input</result>
+ </action>
+ <action name="login_*" method="{1}" class="org.chorem.vradi.actions.LoginAction">
+ <result name="input">/jsp/login.jsp</result>
+ <result name="login" type="redirectAction">home</result>
+ <result type="redirectAction">home</result>
+ </action>
+ <action name="logout" class="org.chorem.vradi.actions.LogoutAction">
+ <result type="redirectAction">login_input</result>
+ </action>
+ </package>
+
+ <package name="misc" extends="restrictedArea">
+ <action name="home" class="org.chorem.vradi.actions.HomeAction">
+ <result>/jsp/home.jsp</result>
+ <result name="input" type="redirectAction">home</result>
+ </action>
+ </package>
+
</struts>
Modified: trunk/vradi-web/src/main/resources/vradi-web.properties
===================================================================
--- trunk/vradi-web/src/main/resources/vradi-web.properties 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/resources/vradi-web.properties 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,23 @@
+application.name=${project.name}
+application.version=${project.version}
+application.site.url=http://maven-site.chorem.org/vradi/index.html
+#licence.name=${project.licenses[0].license.name}
+#licence.url=${project.licenses.0.url}
+application.organisation.name=${project.organization.name}
+application.organisation.url=${project.organization.url}
+
+# Wikitty
+wikitty.WikittyService.components=org.nuiton.wikitty.services.WikittyServiceHessianClient,\
+org.nuiton.wikitty.services.WikittyServiceNotifier,\
+org.nuiton.wikitty.services.WikittyServiceCached,\
+org.nuiton.wikitty.services.WikittyServiceSecurity
+wikitty.service.cache.allwaysRestoreCopies=false
+wikitty.service.event.propagate=false
+wikitty.service.event.listen=true
+wikitty.service.event.propagate.transporter=org.nuiton.wikitty.services.XMPPNotifierTransporter
+wikitty.WikittyServiceCached.components=org.nuiton.wikitty.services.WikittyCacheJCS
+wikitty.service.server.url=${vradi.remote.endpoint}/wikittyservice
+wikitty.service.cache.priority.extensions=Thesaurus, User, Status, XmlStream
+jcs.default=
+jcs.default.cacheattributes.MaxObjects=1000
+jcs.priority.cacheattributes.MaxObjects=10000
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/web.xml 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/web.xml 2011-05-20 14:08:45 UTC (rev 32)
@@ -31,31 +31,18 @@
<!-- Filters -->
<filter>
- <filter-name>action2-cleanup</filter-name>
- <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
- </filter>
- <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
- <filter-name>action2-cleanup</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Welcome file lists -->
<welcome-file-list>
- <welcome-file>index.jsp</welcome-file>
+ <welcome-file>index.html</welcome-file>
</welcome-file-list>
- <jsp-config>
- <jsp-property-group>
- <url-pattern>*.jsp</url-pattern>
- </jsp-property-group>
- </jsp-config>
</web-app>
Copied: trunk/vradi-web/src/main/webapp/index.html (from rev 31, trunk/vradi-web/src/main/webapp/index.jsp)
===================================================================
--- trunk/vradi-web/src/main/webapp/index.html (rev 0)
+++ trunk/vradi-web/src/main/webapp/index.html 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="refresh" content="0;URL=home.action"/>
+ <title>Vradi web</title>
+ </head>
+
+ <body onload="">
+
+ </body>
+</html>
\ No newline at end of file
Deleted: trunk/vradi-web/src/main/webapp/index.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/index.jsp 2011-05-18 15:56:32 UTC (rev 31)
+++ trunk/vradi-web/src/main/webapp/index.jsp 2011-05-20 14:08:45 UTC (rev 32)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <%--<meta http-equiv="refresh" content="0;URL=home.action?request_locale=fr_FR"/>--%>
- <title>Vradi web</title>
- </head>
-
- <body onload="">
-
- </body>
-</html>
\ No newline at end of file
Added: trunk/vradi-web/src/main/webapp/jsp/forgotPassword.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/jsp/forgotPassword.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/jsp/forgotPassword.jsp 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,24 @@
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags" %>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page">
+ <head>
+ <title><s:text name="vradi.forgotpwd.title" /></title>
+ <s:head />
+ </head>
+ <body>
+ <div id="content">
+ <div id="formFrame fond">
+ <h1><s:text name="vradi.forgotpwd.title" /></h1>
+ <s:form action="forgotPassword">
+ <p>
+ <s:textfield key="vradi.login.email" name="email" labelposition="top" labelSeparator=" :" />
+ <s:submit key="vradi.forgotpwd.submit" name="submit" />
+ </p>
+ </s:form>
+ <s:a action="login_input" id="loginLink"><s:text name="vradi.login.title" /></s:a>
+ </div>
+ </div>
+ </body>
+</html>
Added: trunk/vradi-web/src/main/webapp/jsp/home.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/jsp/home.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/jsp/home.jsp 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,5 @@
+<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
+<html>
+<head><title>Simple jsp page</title></head>
+<body>Place your content here</body>
+</html>
\ No newline at end of file
Added: trunk/vradi-web/src/main/webapp/jsp/login.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/jsp/login.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/jsp/login.jsp 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,27 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags"%>
+
+<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page">
+ <head>
+ <title><s:text name="vradi.login.title" /></title>
+ <s:head />
+ </head>
+ <body>
+ <div id="content">
+ <div id="formFrame" class="fond">
+ <h1><s:text name="vradi.login.title" /></h1>
+ <br/>
+ <br/>
+ <s:actionerror />
+ <s:form action="login">
+ <s:textfield key="vradi.login.email" name="email" labelposition="top" labelSeparator=" :" />
+ <s:password key="vradi.login.password" name="password" labelposition="top" labelSeparator=" :" />
+ <s:submit key="vradi.login.submit" name="submit" />
+ </s:form>
+ <s:a action="register_input" id="registerLink"><s:text name="vradi.register.title" /></s:a><br />
+ <s:a action="forgotPassword_input" id="forgotPwd"><s:text name="vradi.forgotpwd.title" /></s:a>
+ </div>
+ </div>
+ </body>
+</html>
Added: trunk/vradi-web/src/main/webapp/jsp/register.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/jsp/register.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/jsp/register.jsp 2011-05-20 14:08:45 UTC (rev 32)
@@ -0,0 +1,27 @@
+<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@taglib prefix="s" uri="/struts-tags" %>
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ xmlns:jsp="http://java.sun.com/JSP/Page">
+ <head>
+ <title><s:text name="vradi.register.title" /></title>
+ <s:head />
+ </head>
+ <body>
+ <div id="content">
+ <div id="formFrame" class="fond">
+ <h1><s:text name="vradi.register.title" /></h1>
+ <s:form action="register">
+ <s:actionerror />
+ <p>
+ <s:textfield key="vradi.login.email" name="email" labelposition="top" labelSeparator=" :" />
+ <s:password key="vradi.login.password" name="password" labelposition="top" labelSeparator=" :" />
+ <s:password key="vradi.login.repeatPassword" name="repeatPassword" labelposition="top" labelSeparator=" :" />
+ <s:submit key="vradi.register.submit" name="submit" />
+ </p>
+ </s:form>
+ <s:a action="login_input" id="loginLink"><s:text name="vradi.login.title" /></s:a>
+ </div>
+ </div>
+ </body>
+</html>
1
0
r31 - in trunk: . vradi-swing/src/main/java/org/chorem/vradi/services vradi-web vradi-web/src/main/java vradi-web/src/main/java/org vradi-web/src/main/java/org/chorem vradi-web/src/main/java/org/chorem/vradi vradi-web/src/main/resources/i18n vradi-web/src/main/webapp vradi-web/src/main/webapp/WEB-INF
by sletellier@users.chorem.org 18 May '11
by sletellier@users.chorem.org 18 May '11
18 May '11
Author: sletellier
Date: 2011-05-18 17:56:32 +0200 (Wed, 18 May 2011)
New Revision: 31
Url: http://chorem.org/repositories/revision/vradi/31
Log:
#375 Initialisation du module Vradi-web
Added:
trunk/vradi-web/src/main/java/org/
trunk/vradi-web/src/main/java/org/chorem/
trunk/vradi-web/src/main/java/org/chorem/vradi/
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java
trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
Modified:
trunk/pom.xml
trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java
trunk/vradi-web/pom.xml
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/webapp/WEB-INF/web.xml
trunk/vradi-web/src/main/webapp/index.jsp
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-18 15:00:05 UTC (rev 30)
+++ trunk/pom.xml 2011-05-18 15:56:32 UTC (rev 31)
@@ -17,8 +17,8 @@
<module>vradi-entities</module>
<module>vradi-services</module>
<module>vradi-services-web</module>
+ <module>vradi-web</module>
<module>vradi-swing</module>
- <module>vradi-web</module>
</modules>
<name>Vradi</name>
Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java
===================================================================
--- trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java 2011-05-18 15:00:05 UTC (rev 30)
+++ trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java 2011-05-18 15:56:32 UTC (rev 31)
@@ -26,7 +26,6 @@
import com.caucho.hessian.client.HessianProxyFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.vradi.VradiConfig;
import org.chorem.vradi.VradiConfigHelper;
import org.nuiton.util.ApplicationConfig;
import org.nuiton.wikitty.WikittyProxy;
Modified: trunk/vradi-web/pom.xml
===================================================================
--- trunk/vradi-web/pom.xml 2011-05-18 15:00:05 UTC (rev 30)
+++ trunk/vradi-web/pom.xml 2011-05-18 15:56:32 UTC (rev 31)
@@ -15,6 +15,7 @@
<version>0.7-SNAPSHOT</version>
</parent>
+ <groupId>org.chorem.vradi</groupId>
<artifactId>vradi-web</artifactId>
<name>Vradi :: Web</name>
@@ -34,6 +35,25 @@
<dependencies>
+ <!-- project dependencies -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vradi-entities</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vradi-services</artifactId>
+ <version>${project.version}</version>
+ <!-- WARNING! check it works chemit 2010-10-28 : it comes from wikitty-solr-impl but conflits with stax -->
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-stax-api_1.0_spec</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<!-- compile dependencies -->
<dependency>
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiSession.java 2011-05-18 15:56:32 UTC (rev 31)
@@ -0,0 +1,74 @@
+package org.chorem.vradi;
+
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.util.ApplicationConfig;
+import org.nuiton.wikitty.WikittyProxy;
+import org.nuiton.wikitty.WikittyService;
+import org.nuiton.wikitty.WikittyServiceFactory;
+import org.nuiton.wikitty.entities.WikittyUser;
+
+/**
+ * Classe utilisee pour stocker les objets utils en session utilisateur
+ *
+ * @author poussin
+ * @version $Revision: 285 $
+ *
+ * Last update: $Date: 2011-05-16 15:21:52 +0200 (lun. 16 mai 2011) $
+ * by : $Author: sletellier $
+ */
+public class VradiSession {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(VradiSession.class);
+
+ static final private String VRADI_SESSION_KEY = VradiSession.class.getSimpleName();
+
+ protected WikittyProxy proxy;
+ private WikittyUser user;
+
+ public VradiSession() {
+ ApplicationConfig config = VradiWebConfig.getConfig();
+ WikittyService ws = WikittyServiceFactory.buildWikittyService(config);
+ proxy = new WikittyProxy(config, ws);
+ }
+
+ static public void invalidate(Map<String, Object> session) {
+ session.remove(VRADI_SESSION_KEY);
+ }
+
+ static public VradiSession getVradiSession(HttpServletRequest request) {
+ HttpSession session = request.getSession();
+ VradiSession result = getVradiSession(session);
+ return result;
+ }
+
+ static public VradiSession getVradiSession(HttpSession httpSession) {
+ VradiSession result = (VradiSession) httpSession.getAttribute(VRADI_SESSION_KEY);
+ if (result == null) {
+ result = new VradiSession();
+ httpSession.setAttribute(VRADI_SESSION_KEY, result);
+ }
+ return result;
+ }
+
+ static public VradiSession getVradiSession(Map<String, Object> session) {
+ VradiSession result = (VradiSession)session.get(VRADI_SESSION_KEY);
+ if (result == null) {
+ result = new VradiSession();
+ session.put(VRADI_SESSION_KEY, result);
+ }
+ return result;
+ }
+
+ public WikittyProxy getProxy() {
+ return proxy;
+ }
+
+ public WikittyUser getUser() {
+ return user;
+ }
+}
Added: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java (rev 0)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiWebConfig.java 2011-05-18 15:56:32 UTC (rev 31)
@@ -0,0 +1,179 @@
+package org.chorem.vradi;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.util.ApplicationConfig;
+import org.nuiton.util.ArgumentsParserException;
+import org.nuiton.util.Version;
+import org.nuiton.util.VersionUtil;
+import org.nuiton.wikitty.WikittyConfigOption;
+
+import java.util.Locale;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * Vradi Web configuration.
+ *
+ * @author sletellier
+ * @version $Revision: 21 $
+ * <p/>
+ * Last update : $Date: 2011-05-09 18:43:58 +0200 (lun. 09 mai 2011) $
+ * By : $Author: sletellier $
+ */
+public class VradiWebConfig {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static private Log log = LogFactory.getLog(VradiWebConfig.class);
+
+ private static ApplicationConfig config;
+
+ private VradiWebConfig() {
+ }
+
+ public static ApplicationConfig getConfig(String... args) {
+
+ if (config == null) {
+
+ // Creating instance of ApplicationConfig
+ config = new ApplicationConfig(VradiWebOption.CONFIG_FILE.getDefaultValue());
+
+ // Load service options
+ config.loadDefaultOptions(VradiServiceConfiguration.VradiServiceOption.class);
+
+ // Load wikitty options
+ config.loadDefaultOptions(WikittyConfigOption.class);
+
+ // Load vradi options
+ config.loadDefaultOptions(VradiWebOption.class);
+
+ try {
+ // Parse args
+ config.parse(args);
+
+ // on supprime le stamp de snapshot s'il existe
+ String sVersion = VersionUtil.removeSnapshot(config.getOption("application.version"));
+ Version version = VersionUtil.valueOf(sVersion);
+ config.setDefaultOption(VradiWebOption.VRADI_VERSION.key, version.getVersion());
+
+ // la version de la base est sans classifier (pas de alpha, ou rc,...)
+ Version dbVersion;
+ if (version.hasClassifier()) {
+ dbVersion = VersionUtil.removeClassifier(version);
+ } else {
+ dbVersion = VersionUtil.valueOf(version.toString());
+ }
+
+ config.setDefaultOption(VradiWebOption.VRADI_DATABASE_VERSION.key, dbVersion.getVersion());
+ } catch (ArgumentsParserException eee) {
+ if (log.isErrorEnabled()) {
+ log.error("Can't load vradi configuration", eee);
+ }
+ }
+ }
+ return config;
+ }
+
+ /** Vradi option enum. */
+ public enum VradiWebOption implements ApplicationConfig.OptionDef {
+
+ CONFIG_FILE(
+ ApplicationConfig.CONFIG_FILE_NAME,
+ _("vradi.config.configFileName.description"),
+ "vradi.properties", String.class, true, true),
+
+ VRADI_VERSION(
+ "vradi.version",
+ _("vradi.config.version.description"),
+ null, String.class, true, true),
+
+ VRADI_DATABASE_VERSION(
+ "vradi.database.version",
+ _("vradi.config.database.version.description"),
+ null, String.class, true, true),
+
+ VRADI_LAST_VERSION(
+ "vradi.last.version",
+ _("vradi.config.last.version.description"),
+ null, String.class, true, true),
+
+ // ui config
+ LOCALE(
+ "ui.locale",
+ _("vradi.config.ui.locale"),
+ Locale.FRANCE.toString(),
+ Locale.class, false, false),
+
+ // achitecture client serveur
+ REMOTE_ENDPOINT(
+ "vradi.remote.endpoint",
+ _("vradi.config.remote.endpoint.description"),
+ "", String.class, false, false);
+
+ public String key;
+
+ public String description;
+
+ public String defaultValue;
+
+ public Class<?> type;
+
+ public boolean isTransient;
+
+ public boolean isFinal;
+
+ VradiWebOption(String key, String description, String defaultValue, Class<?> type, boolean isTransient, boolean isFinal) {
+ this.key = key;
+ this.description = description;
+ this.defaultValue = defaultValue;
+ this.type = type;
+ this.isTransient = isTransient;
+ this.isFinal = isFinal;
+ }
+
+ @Override
+ public boolean isFinal() {
+ return isFinal;
+ }
+
+ @Override
+ public boolean isTransient() {
+ return isTransient;
+ }
+
+ @Override
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ @Override
+ public String getDescription() {
+ return description;
+ }
+
+ @Override
+ public String getKey() {
+ return key;
+ }
+
+ @Override
+ public Class<?> getType() {
+ return type;
+ }
+
+ @Override
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ @Override
+ public void setTransient(boolean isTransient) {
+ this.isTransient = isTransient;
+ }
+
+ @Override
+ public void setFinal(boolean isFinal) {
+ this.isFinal = isFinal;
+ }
+ }
+}
Added: trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties (rev 0)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_en_GB.properties 2011-05-18 15:56:32 UTC (rev 31)
@@ -0,0 +1,6 @@
+vradi.config.configFileName.description=Vradi web config files name
+vradi.config.database.version.description=Database version
+vradi.config.last.version.description=Last started version
+vradi.config.remote.endpoint.description=Url of vradi service
+vradi.config.ui.locale=Vradi web locale
+vradi.config.version.description=Vradi web version
\ No newline at end of file
Modified: trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
===================================================================
--- trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-18 15:00:05 UTC (rev 30)
+++ trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties 2011-05-18 15:56:32 UTC (rev 31)
@@ -0,0 +1,6 @@
+vradi.config.configFileName.description=Fichier de configuration de Vradi web
+vradi.config.database.version.description=Version de la base de donnée
+vradi.config.last.version.description=Dernière version de Vradi web lancée
+vradi.config.remote.endpoint.description=Url de l'addresse de Vradi service
+vradi.config.ui.locale=Locale de l'instance de Vradi web
+vradi.config.version.description=Version de Vradi web
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/web.xml 2011-05-18 15:00:05 UTC (rev 30)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/web.xml 2011-05-18 15:56:32 UTC (rev 31)
@@ -56,7 +56,6 @@
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
- <trim-directive-whitespaces>true</trim-directive-whitespaces>
</jsp-property-group>
</jsp-config>
</web-app>
Modified: trunk/vradi-web/src/main/webapp/index.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/index.jsp 2011-05-18 15:00:05 UTC (rev 30)
+++ trunk/vradi-web/src/main/webapp/index.jsp 2011-05-18 15:56:32 UTC (rev 31)
@@ -1,5 +1,13 @@
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<html>
-<head><title>Simple jsp page</title></head>
-<body>Place your content here</body>
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <%--<meta http-equiv="refresh" content="0;URL=home.action?request_locale=fr_FR"/>--%>
+ <title>Vradi web</title>
+ </head>
+
+ <body onload="">
+
+ </body>
</html>
\ No newline at end of file
1
0
Author: sletellier
Date: 2011-05-18 17:00:05 +0200 (Wed, 18 May 2011)
New Revision: 30
Url: http://chorem.org/repositories/revision/vradi/30
Log:
Remove idea file
Removed:
trunk/vradi-web/vradi-web.iml
Deleted: trunk/vradi-web/vradi-web.iml
===================================================================
--- trunk/vradi-web/vradi-web.iml 2011-05-18 14:47:27 UTC (rev 29)
+++ trunk/vradi-web/vradi-web.iml 2011-05-18 15:00:05 UTC (rev 30)
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="web" name="Web">
- <configuration>
- <descriptors>
- <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
- </descriptors>
- <webroots>
- <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
- <root url="file://$MODULE_DIR$/src/main/webapp/WEB-INF" relative="WEB-INF" />
- </webroots>
- </configuration>
- </facet>
- <facet type="gwt" name="GWT">
- <configuration>
- <setting name="webFacet" value="Web" />
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="false">
- <output url="file://$MODULE_DIR$/target/classes" />
- <output-test url="file://$MODULE_DIR$/target/test-classes" />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/resources" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/i18n" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Maven: org.nuiton:nuiton-utils:2.2" level="project" />
- <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
- <orderEntry type="library" name="Maven: commons-primitives:commons-primitives:1.0" level="project" />
- <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
- <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
- <orderEntry type="library" name="Maven: org.nuiton.i18n:nuiton-i18n:2.4" level="project" />
- <orderEntry type="library" name="Maven: commons-io:commons-io:2.0.1" level="project" />
- <orderEntry type="library" name="Maven: org.nuiton.wikitty:wikitty-api:3.1.2" level="project" />
- <orderEntry type="library" name="Maven: gnu.cajo:cajo:1.168" level="project" />
- <orderEntry type="library" name="Maven: org.apache.jcs:jcs:1.3" level="project" />
- <orderEntry type="library" name="Maven: concurrent:concurrent:1.0" level="project" />
- <orderEntry type="library" name="Maven: net.iharder:base64:2.3.8" level="project" />
- <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
- <orderEntry type="library" name="Maven: xpp3:xpp3:1.1.4c" level="project" />
- <orderEntry type="library" name="Maven: net.sf.opencsv:opencsv:2.1" level="project" />
- <orderEntry type="library" name="Maven: jboss.jbossts:jbossjta:4.9.0.GA" level="project" />
- <orderEntry type="library" name="Maven: javax.transaction:jta:1.1" level="project" />
- <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.2.2" level="project" />
- <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.3.4.O" level="project" />
- <orderEntry type="library" name="Maven: jivesoftware:smack:3.1.0" level="project" />
- <orderEntry type="library" name="Maven: jivesoftware:smackx:3.1.0" level="project" />
- <orderEntry type="library" name="Maven: org.apache.struts:struts2-core:2.2.3" level="project" />
- <orderEntry type="library" name="Maven: org.apache.struts.xwork:xwork-core:2.2.3" level="project" />
- <orderEntry type="library" name="Maven: ognl:ognl:3.0.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: javassist:javassist:3.12.1.GA" level="project" />
- <orderEntry type="library" name="Maven: asm:asm:3.1" level="project" />
- <orderEntry type="library" name="Maven: asm:asm-commons:3.1" level="project" />
- <orderEntry type="library" name="Maven: asm:asm-tree:3.1" level="project" />
- <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.16" level="project" />
- <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
- <orderEntry type="library" name="Maven: com.sun:tools:1.5.0" level="project" />
- <orderEntry type="library" name="Maven: javax.mail:mail:1.4.3" level="project" />
- <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
- <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
- <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:jsp-api:2.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: log4j:log4j:1.2.16" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.nuiton.wikitty:wikitty-jdbc:3.1.2" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.nuiton.wikitty:wikitty-solr:3.1.2" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-core:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-solrj:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-core:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: commons-codec:commons-codec:1.4" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:1.0.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.zookeeper:zookeeper:3.3.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: jline:jline:0.9.94" level="project" />
- <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.2" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:wstx-asl:3.2.7" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.6.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-noggit:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-analyzers:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-highlighter:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-memory:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-queries:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: jakarta-regexp:jakarta-regexp:1.4" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-misc:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-spatial:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-spellchecker:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-commons-csv:3.1.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.velocity:velocity:1.6.4" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: oro:oro:2.0.8" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.velocity:velocity-tools:2.0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: commons-digester:commons-digester:1.8" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: commons-chain:commons-chain:1.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: commons-validator:commons-validator:1.3.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: dom4j:dom4j:1.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: sslext:sslext:1.2-0" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts-core:1.3.8" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.2" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts-taglib:1.3.8" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts-tiles:1.3.8" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: commons-pool:commons-pool:1.5.4" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-log4j12:1.6.1" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: com.h2database:h2:1.2.127" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts2-config-browser-plugin:2.2.3" level="project" />
- <orderEntry type="library" scope="RUNTIME" name="Maven: postgresql:postgresql:8.4-701.jdbc4" level="project" />
- </component>
-</module>
-
1
0
r29 - in trunk: . vradi-swing/src/main/java/org/chorem/vradi/ui/thesaurus/helpers vradi-web vradi-web/src vradi-web/src/main vradi-web/src/main/i18n vradi-web/src/main/resources vradi-web/src/main/resources/i18n vradi-web/src/main/webapp vradi-web/src/main/webapp/WEB-INF vradi-web/src/test
by sletellier@users.chorem.org 18 May '11
by sletellier@users.chorem.org 18 May '11
18 May '11
Author: sletellier
Date: 2011-05-18 16:47:27 +0200 (Wed, 18 May 2011)
New Revision: 29
Url: http://chorem.org/repositories/revision/vradi/29
Log:
#375 Initialisation du module Vradi-web
Added:
trunk/vradi-web/
trunk/vradi-web/LICENSE.txt
trunk/vradi-web/README.txt
trunk/vradi-web/changelog.txt
trunk/vradi-web/pom.xml
trunk/vradi-web/src/
trunk/vradi-web/src/main/
trunk/vradi-web/src/main/i18n/
trunk/vradi-web/src/main/i18n/jsp.rules
trunk/vradi-web/src/main/java/
trunk/vradi-web/src/main/resources/
trunk/vradi-web/src/main/resources/i18n/
trunk/vradi-web/src/main/resources/i18n/vradi-web_fr_FR.properties
trunk/vradi-web/src/main/resources/log4j.properties
trunk/vradi-web/src/main/resources/struts.xml
trunk/vradi-web/src/main/resources/vradi-web.properties
trunk/vradi-web/src/main/webapp/
trunk/vradi-web/src/main/webapp/WEB-INF/
trunk/vradi-web/src/main/webapp/WEB-INF/web.xml
trunk/vradi-web/src/main/webapp/index.jsp
trunk/vradi-web/src/test/
trunk/vradi-web/src/test/java/
trunk/vradi-web/vradi-web.iml
Modified:
trunk/pom.xml
trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/thesaurus/helpers/ThesaurusDataHelper.java
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-17 15:21:57 UTC (rev 28)
+++ trunk/pom.xml 2011-05-18 14:47:27 UTC (rev 29)
@@ -18,6 +18,7 @@
<module>vradi-services</module>
<module>vradi-services-web</module>
<module>vradi-swing</module>
+ <module>vradi-web</module>
</modules>
<name>Vradi</name>
@@ -109,7 +110,7 @@
<!-- libraries version -->
<jaxxVersion>2.4</jaxxVersion>
- <nuitonUtilsVersion>2.1.2</nuitonUtilsVersion>
+ <nuitonUtilsVersion>2.2</nuitonUtilsVersion>
<nuitonI18nVersion>2.4</nuitonI18nVersion>
<nuitonWidgetVersion>1.1.1</nuitonWidgetVersion>
<generatorPluginVersion>2.3.3</generatorPluginVersion>
@@ -117,6 +118,9 @@
<oooVersion>3.2.1</oooVersion>
<javamailVersion>1.4.3</javamailVersion>
<slf4jVersion>1.6.1</slf4jVersion>
+ <struts2Version>2.2.3</struts2Version>
+ <servletApiVersion>2.5</servletApiVersion>
+ <jspApiVersion>2.0</jspApiVersion>
<!-- license header default copyright holder -->
<license.organizationName>Codelutin</license.organizationName>
@@ -204,12 +208,6 @@
</dependency>
<dependency>
- <groupId>org.apache.struts.xwork</groupId>
- <artifactId>xwork-core</artifactId>
- <version>2.2.1.1</version>
- </dependency>
-
- <dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swingx-core</artifactId>
<version>1.6.2-2</version>
@@ -247,26 +245,23 @@
</dependency>
<dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- <version>1.1.4c</version>
- </dependency>
-
- <dependency>
<groupId>org.nuiton.wikitty</groupId>
<artifactId>wikitty-api</artifactId>
<version>${wikittyVersion}</version>
</dependency>
+
<dependency>
<groupId>org.nuiton.wikitty</groupId>
<artifactId>wikitty-jdbc</artifactId>
<version>${wikittyVersion}</version>
</dependency>
+
<dependency>
<groupId>org.nuiton.wikitty</groupId>
<artifactId>wikitty-solr</artifactId>
<version>${wikittyVersion}</version>
</dependency>
+
<dependency>
<groupId>org.nuiton.wikitty</groupId>
<artifactId>wikitty-hessian-client</artifactId>
@@ -374,13 +369,6 @@
<!-- Needed in runtime by solr (set provided where needed) -->
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
@@ -405,6 +393,45 @@
<version>3.1.0</version>
</dependency>
+ <!-- Vradi Web -->
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ <version>${struts2Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-config-browser-plugin</artifactId>
+ <version>${struts2Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts.xwork</groupId>
+ <artifactId>xwork-core</artifactId>
+ <version>${struts2Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.12.1.GA</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>${jspApiVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${servletApiVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+
</dependencies>
</dependencyManagement>
Modified: trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/thesaurus/helpers/ThesaurusDataHelper.java
===================================================================
--- trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/thesaurus/helpers/ThesaurusDataHelper.java 2011-05-17 15:21:57 UTC (rev 28)
+++ trunk/vradi-swing/src/main/java/org/chorem/vradi/ui/thesaurus/helpers/ThesaurusDataHelper.java 2011-05-18 14:47:27 UTC (rev 29)
@@ -23,21 +23,19 @@
*/
package org.chorem.vradi.ui.thesaurus.helpers;
-import org.apache.commons.lang.xwork.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.vradi.entities.RootThesaurus;
import org.chorem.vradi.entities.Thesaurus;
import org.chorem.vradi.services.VradiException;
import org.chorem.vradi.services.VradiService;
+import org.nuiton.util.StringUtil;
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.search.TreeNodeResult;
-import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.Map;
public class ThesaurusDataHelper {
@@ -141,7 +139,7 @@
}
String result;
if (thesaurus.getTags() != null) {
- result = StringUtils.join(thesaurus.getTags(), " ,");
+ result = StringUtil.join(thesaurus.getTags(), " ,", true);
} else {
result = "";
}
Property changes on: trunk/vradi-web
___________________________________________________________________
Added: svn:ignore
+ *.ipr
*.iws
*.iml
target
solr
*.log
*.log.*
nbactions.xml
.settings
PutObjectStoreDirHere
.project
Added: trunk/vradi-web/LICENSE.txt
===================================================================
--- trunk/vradi-web/LICENSE.txt (rev 0)
+++ trunk/vradi-web/LICENSE.txt 2011-05-18 14:47:27 UTC (rev 29)
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ 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 Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
\ No newline at end of file
Added: trunk/vradi-web/pom.xml
===================================================================
--- trunk/vradi-web/pom.xml (rev 0)
+++ trunk/vradi-web/pom.xml 2011-05-18 14:47:27 UTC (rev 29)
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <artifactId>vradi</artifactId>
+ <groupId>org.chorem</groupId>
+ <version>0.7-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>vradi-web</artifactId>
+
+ <name>Vradi :: Web</name>
+ <description>Vradi Web</description>
+
+ <packaging>war</packaging>
+
+ <properties>
+ <i18n.bundles>fr_FR,en_GB</i18n.bundles>
+ <i18n.silent>true</i18n.silent>
+ <i18n.bundleOutputName>vradi-web-i18n</i18n.bundleOutputName>
+ <i18n.bundleOutputDir>
+ ${basedir}/target/generated-sources/resources
+ </i18n.bundleOutputDir>
+ <i18n.addBundleOuputDirParent>false</i18n.addBundleOuputDirParent>
+ </properties>
+
+ <dependencies>
+
+ <!-- compile dependencies -->
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.wikitty</groupId>
+ <artifactId>wikitty-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts.xwork</groupId>
+ <artifactId>xwork-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+
+ <!-- provided dependencies -->
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- runtime dependencies -->
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.wikitty</groupId>
+ <artifactId>wikitty-jdbc</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.wikitty</groupId>
+ <artifactId>wikitty-solr</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-config-browser-plugin</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>scan-java-sources</id>
+ <goals>
+ <goal>parserJava</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>scan-jsp-sources</id>
+ <goals>
+ <goal>parserJsp</goal>
+ </goals>
+ <configuration>
+ <userRulesFiles>
+ <file>${basedir}/src/main/i18n/jsp.rules</file>
+ </userRulesFiles>
+ <namespaces>
+ <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s>
+ <sx>
+ http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
+ </sx>
+ <jsp>http://java.sun.com/JSP/Page</jsp>
+ <decorator>
+ http://www.opensymphony.com/sitemesh/decorator
+ </decorator>
+ </namespaces>
+ </configuration>
+ </execution>
+ <execution>
+ <id>gen-and-make-bundle</id>
+ <goals>
+ <goal>gen</goal>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: trunk/vradi-web/src/main/i18n/jsp.rules
===================================================================
--- trunk/vradi-web/src/main/i18n/jsp.rules (rev 0)
+++ trunk/vradi-web/src/main/i18n/jsp.rules 2011-05-18 14:47:27 UTC (rev 29)
@@ -0,0 +1,9 @@
+# Règles i18n pour les jsp
+
+//s:text/@name
+//s:submit/@key
+//s:textfield/@key
+//s:password/@key
+//s:file/@key
+
+//sx:datetimepicker/@key
Added: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml (rev 0)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-05-18 14:47:27 UTC (rev 29)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ bow
+
+ $Id: struts.xml 276 2011-04-29 21:02:55Z bpoussin $
+ $HeadURL: http://svn.chorem.org/svn/bow/trunk/bow-ui/src/main/resources/struts.xml $
+ %%
+ Copyright (C) 2010 - 2011 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ 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 Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.0.dtd">
+<struts>
+ <constant name="struts.devMode" value="true"/>
+ <constant name="struts.ognl.allowStaticMethodAccess" value="true"/>
+ <constant name="struts.enable.SlashesInActionNames" value="true"/>
+
+ <!--
+ | Definition d'un package pour l'espace public
+ | - surcharge de parametre de certain intercepteur
+ +-->
+ <package name="publicArea" extends="struts-default">
+ <interceptors>
+ <interceptor-stack name="publicAreaStack">
+ <interceptor-ref name="defaultStack">
+ <param name="store.operationMode">AUTOMATIC</param>
+ <param name="fileUpload.allowedExtensions">.html</param>
+ </interceptor-ref>
+ </interceptor-stack>
+ </interceptors>
+ <default-interceptor-ref name="publicAreaStack"/>
+ </package>
+
+ <!--
+ | Definition d'un package pour l'espace des page de login
+ | - ajout de l'intercepteur qui verifie que la personne est bien identifiee
+ +-->
+ <!--<package name="loginArea" extends="publicArea">-->
+ <!--<interceptors>-->
+ <!--<interceptor name="logout" class="org.chorem.bow.interceptor.LogoutInterceptor"/>-->
+ <!--<interceptor-stack name="loginAreaStack">-->
+ <!--<interceptor-ref name="logout"/>-->
+ <!--<interceptor-ref name="publicAreaStack"/>-->
+ <!--</interceptor-stack>-->
+ <!--</interceptors>-->
+ <!--<default-interceptor-ref name="loginAreaStack"/>-->
+ <!--</package>-->
+
+ <!--
+ | Definition d'un package pour l'espace prive
+ | - ajout de l'intercepteur qui verifie que la personne est bien identifiee
+ +-->
+ <!--<package name="restrictedArea" extends="publicArea">-->
+ <!--<interceptors>-->
+ <!--<interceptor name="login" class="org.chorem.bow.interceptor.LoginInterceptor">-->
+ <!--<param name="redirect">login_input.action</param>-->
+ <!--</interceptor>-->
+ <!--<interceptor-stack name="restrictedAreaStack">-->
+ <!--<interceptor-ref name="login"/>-->
+ <!--<interceptor-ref name="publicAreaStack"/>-->
+ <!--</interceptor-stack>-->
+ <!--</interceptors>-->
+ <!--<default-interceptor-ref name="restrictedAreaStack"/>-->
+ <!--</package>-->
+
+ <!--<package name="login" extends="loginArea">-->
+ <!--<action name="register_*" method="{1}" class="org.chorem.bow.action.RegisterAction">-->
+ <!--<result name="input">/jsp/register.jsp</result>-->
+ <!--<result type="redirectAction">home</result>-->
+ <!--</action>-->
+ <!--<action name="forgotPassword_*" method="{1}" class="org.chorem.bow.action.ForgotPasswordAction">-->
+ <!--<result name="input">/jsp/forgotPassword.jsp</result>-->
+ <!--<result type="redirectAction">login_input</result>-->
+ <!--</action>-->
+ <!--<action name="login_*" method="{1}" class="org.chorem.bow.action.LoginAction">-->
+ <!--<result name="input">/jsp/login.jsp</result>-->
+ <!--<result name="login" type="redirectAction">home</result>-->
+ <!--<result type="redirectAction">home</result>-->
+ <!--</action>-->
+ <!--<action name="logout" class="org.chorem.bow.action.LogoutAction">-->
+ <!--<result type="redirectAction">login_input</result>-->
+ <!--</action>-->
+ <!--</package>-->
+</struts>
Added: trunk/vradi-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/web.xml 2011-05-18 14:47:27 UTC (rev 29)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ bow
+
+ $Id: web.xml 280 2011-05-05 09:32:39Z echatellier $
+ $HeadURL: http://svn.chorem.org/svn/bow/trunk/bow-ui/src/main/webapp/WEB-INF/web.xml $
+ %%
+ Copyright (C) 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ 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 Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+<web-app id="bow" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>Bow</display-name>
+
+ <!-- Filters -->
+ <filter>
+ <filter-name>action2-cleanup</filter-name>
+ <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>struts2</filter-name>
+ <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>action2-cleanup</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>struts2</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- Welcome file lists -->
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <jsp-config>
+ <jsp-property-group>
+ <url-pattern>*.jsp</url-pattern>
+ <trim-directive-whitespaces>true</trim-directive-whitespaces>
+ </jsp-property-group>
+ </jsp-config>
+</web-app>
Added: trunk/vradi-web/src/main/webapp/index.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/index.jsp (rev 0)
+++ trunk/vradi-web/src/main/webapp/index.jsp 2011-05-18 14:47:27 UTC (rev 29)
@@ -0,0 +1,5 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+<head><title>Simple jsp page</title></head>
+<body>Place your content here</body>
+</html>
\ No newline at end of file
Added: trunk/vradi-web/vradi-web.iml
===================================================================
--- trunk/vradi-web/vradi-web.iml (rev 0)
+++ trunk/vradi-web/vradi-web.iml 2011-05-18 14:47:27 UTC (rev 29)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="web" name="Web">
+ <configuration>
+ <descriptors>
+ <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
+ </descriptors>
+ <webroots>
+ <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
+ <root url="file://$MODULE_DIR$/src/main/webapp/WEB-INF" relative="WEB-INF" />
+ </webroots>
+ </configuration>
+ </facet>
+ <facet type="gwt" name="GWT">
+ <configuration>
+ <setting name="webFacet" value="Web" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/resources" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/target/generated-sources/i18n" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="Maven: org.nuiton:nuiton-utils:2.2" level="project" />
+ <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+ <orderEntry type="library" name="Maven: commons-primitives:commons-primitives:1.0" level="project" />
+ <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+ <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.3" level="project" />
+ <orderEntry type="library" name="Maven: org.nuiton.i18n:nuiton-i18n:2.4" level="project" />
+ <orderEntry type="library" name="Maven: commons-io:commons-io:2.0.1" level="project" />
+ <orderEntry type="library" name="Maven: org.nuiton.wikitty:wikitty-api:3.1.2" level="project" />
+ <orderEntry type="library" name="Maven: gnu.cajo:cajo:1.168" level="project" />
+ <orderEntry type="library" name="Maven: org.apache.jcs:jcs:1.3" level="project" />
+ <orderEntry type="library" name="Maven: concurrent:concurrent:1.0" level="project" />
+ <orderEntry type="library" name="Maven: net.iharder:base64:2.3.8" level="project" />
+ <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+ <orderEntry type="library" name="Maven: xpp3:xpp3:1.1.4c" level="project" />
+ <orderEntry type="library" name="Maven: net.sf.opencsv:opencsv:2.1" level="project" />
+ <orderEntry type="library" name="Maven: jboss.jbossts:jbossjta:4.9.0.GA" level="project" />
+ <orderEntry type="library" name="Maven: javax.transaction:jta:1.1" level="project" />
+ <orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.2.2" level="project" />
+ <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.3.4.O" level="project" />
+ <orderEntry type="library" name="Maven: jivesoftware:smack:3.1.0" level="project" />
+ <orderEntry type="library" name="Maven: jivesoftware:smackx:3.1.0" level="project" />
+ <orderEntry type="library" name="Maven: org.apache.struts:struts2-core:2.2.3" level="project" />
+ <orderEntry type="library" name="Maven: org.apache.struts.xwork:xwork-core:2.2.3" level="project" />
+ <orderEntry type="library" name="Maven: ognl:ognl:3.0.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: javassist:javassist:3.12.1.GA" level="project" />
+ <orderEntry type="library" name="Maven: asm:asm:3.1" level="project" />
+ <orderEntry type="library" name="Maven: asm:asm-commons:3.1" level="project" />
+ <orderEntry type="library" name="Maven: asm:asm-tree:3.1" level="project" />
+ <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.16" level="project" />
+ <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
+ <orderEntry type="library" name="Maven: com.sun:tools:1.5.0" level="project" />
+ <orderEntry type="library" name="Maven: javax.mail:mail:1.4.3" level="project" />
+ <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
+ <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
+ <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:jsp-api:2.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: log4j:log4j:1.2.16" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.nuiton.wikitty:wikitty-jdbc:3.1.2" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.nuiton.wikitty:wikitty-solr:3.1.2" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-core:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-solrj:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-core:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-codec:commons-codec:1.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:1.0.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.zookeeper:zookeeper:3.3.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: jline:jline:0.9.94" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.2" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.codehaus.woodstox:wstx-asl:3.2.7" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: stax:stax-api:1.0.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-api:1.6.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-noggit:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-analyzers:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-highlighter:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-memory:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-queries:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: jakarta-regexp:jakarta-regexp:1.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-misc:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-spatial:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.lucene:lucene-spellchecker:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.solr:solr-commons-csv:3.1.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.velocity:velocity:1.6.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: oro:oro:2.0.8" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.velocity:velocity-tools:2.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-digester:commons-digester:1.8" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-chain:commons-chain:1.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-validator:commons-validator:1.3.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: dom4j:dom4j:1.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: sslext:sslext:1.2-0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts-core:1.3.8" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.2" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts-taglib:1.3.8" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts-tiles:1.3.8" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-pool:commons-pool:1.5.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:slf4j-log4j12:1.6.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: com.h2database:h2:1.2.127" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.struts:struts2-config-browser-plugin:2.2.3" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: postgresql:postgresql:8.4-701.jdbc4" level="project" />
+ </component>
+</module>
+
1
0