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
r138 - in trunk/vradi-web/src/main: java/org/chorem/vradi/actions webapp/WEB-INF/jsp
by sletellier@users.chorem.org 11 Oct '11
by sletellier@users.chorem.org 11 Oct '11
11 Oct '11
Author: sletellier
Date: 2011-10-11 17:25:11 +0200 (Tue, 11 Oct 2011)
New Revision: 138
Url: http://chorem.org/repositories/revision/vradi/138
Log:
- Remove static getAction method
- Clean all jsp pages to only use tags
Modified:
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentListAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/DeleteAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/EditAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteListAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RestoreUserAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SavedQueriesAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SeekPartnersAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ThesaurusAction.java
trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/sendInvitation.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userInfo.jsp
trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentListAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentListAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/AttachmentListAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -25,10 +25,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(AttachmentListAction.class);
- static public AttachmentListAction getAction() {
- return (AttachmentListAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected String targetId;
/** les fichiers attache a ce target */
protected PagedResult<Attachment> attachments;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/DeleteAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/DeleteAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/DeleteAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -20,10 +20,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(DeleteAction.class);
- static public DeleteAction getAction() {
- return (DeleteAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected String id;
public void setId(String id) {
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/EditAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/EditAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/EditAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -21,10 +21,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(EditAction.class);
- static public EditAction getAction() {
- return (EditAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
/** restraint les modifications possibles sur certaine extension */
protected HttpServletRequest request;
protected String id;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -25,10 +25,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(FormNoteAction.class);
-
- static public FormNoteAction getAction() {
- return (FormNoteAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
/** used form new formNote */
protected String formId;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteListAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteListAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/FormNoteListAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -23,10 +23,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(FormNoteListAction.class);
- static public FormNoteListAction getAction() {
- return (FormNoteListAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected String formId;
protected PagedResult<FormNote> formNotes;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RestoreUserAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RestoreUserAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/RestoreUserAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -35,10 +35,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(RestoreUserAction.class);
- static public RestoreUserAction getAction() {
- return (RestoreUserAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected String userId;
protected VradiUser user;
protected String infoHtml;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SavedQueriesAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SavedQueriesAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SavedQueriesAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -20,10 +20,6 @@
*/
public class SavedQueriesAction extends VradiBaseAction implements ServletRequestAware {
- static public SavedQueriesAction getAction() {
- return (SavedQueriesAction) ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected HttpServletRequest request;
protected List<Query> lastQueries;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SeekPartnersAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SeekPartnersAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SeekPartnersAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -27,10 +27,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(SeekPartnersAction.class);
- static public SeekPartnersAction getAction() {
- return (SeekPartnersAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected String noteId;
protected FormNote note;
protected Set<VradiUser> partners;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/SendInvitationAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -32,10 +32,6 @@
static private Log log = LogFactory.getLog(SendInvitationAction.class);
public static final String SHOW_INVITATION_ACTION = "showInvitation";
- static public SendInvitationAction getAction() {
- return (SendInvitationAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected String noteId;
protected boolean formReceiver;
protected boolean seeker;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -34,10 +34,6 @@
static private Log log = LogFactory.getLog(ShowInvitationAction.class);
public static final String SHOW_RESULT_INVITATION_ACTION = "showInvitationResult";
- static public ShowInvitationAction getAction() {
- return (ShowInvitationAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected HttpServletRequest request;
protected String p;
protected String noteId;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ShowInvitationResultAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -26,10 +26,6 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static private Log log = LogFactory.getLog(ShowInvitationAction.class);
- static public ShowInvitationResultAction getAction() {
- return (ShowInvitationResultAction)ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
protected HttpServletRequest request;
protected String p;
protected String noteId;
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ThesaurusAction.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ThesaurusAction.java 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/ThesaurusAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -24,10 +24,6 @@
private static final long serialVersionUID = -2886756982077980790L;
- static public ThesaurusAction getAction() {
- return (ThesaurusAction) ActionContext.getContext().get(CONTEXT_ACTION_KEY);
- }
-
public static final String THESAURUS_NAME_REQUEST = "thesaurusNameRequest";
protected List<TreeNode> nodes = new ArrayList<TreeNode>();
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-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-10-11 15:25:11 UTC (rev 138)
@@ -2,10 +2,13 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
+import java.util.Date;
import java.util.Map;
import org.apache.struts2.interceptor.SessionAware;
import org.chorem.vradi.VradiSession;
import org.chorem.vradi.VradiWebConfig;
+import org.chorem.vradi.VradiWebHelper;
import org.chorem.vradi.entities.VradiUser;
import org.chorem.vradi.services.VradiDataService;
import org.nuiton.util.ApplicationConfig;
@@ -24,17 +27,6 @@
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";
-
protected static final String CONTEXT_SELECTED_QUERY_KEY = "selectedQuery";
protected transient Map<String, Object> session;
@@ -69,4 +61,8 @@
public ApplicationConfig getConfig() {
return VradiWebConfig.getConfig();
}
+
+ public String formatDate(Date date) {
+ return VradiWebHelper.formatDate(date);
+ }
}
\ No newline at end of file
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/attachmentList.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,33 +4,22 @@
Author : poussin
--%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
-<%@page import="org.chorem.vradi.entities.Attachment"%>
-<%@page import="org.chorem.vradi.actions.AttachmentListAction"%>
-<%@ page import="org.chorem.vradi.VradiWebHelper" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
-<%
-AttachmentListAction action = AttachmentListAction.getAction();
-%>
-
<div id="actionResult" hidden="true">
<img id="indicator-deleteAttachment" src="/img/indicator.gif" alt="deleting..." style="display:none"/>
</div>
<ul>
- <% for (Attachment a : action.getAttachments()) {
- if (a != null) {
- String attachmentId = a.getWikittyId();
- ActionContext.getContext().put("localAttachmentId", attachmentId);
- %>
+ <s:iterator value="attachments" var="attachment">
+ <li>
+ <s:set name="formatedDate" value="%{formatDate(#attachment.date)}"/>
+ <s:property value="#formatedDate"/> <s:a action="raw/%{attachment.wikittyId}/Attachment.content" namespace="/ajax"><s:property value="%{attachment.name}"/></s:a>
- <li><%=VradiWebHelper.formatDate(a.getDate())%> <s:a action="raw/%{localAttachmentId}/Attachment.content" namespace="/ajax"><%=a.getName()%></s:a>
-
- <s:url id="deleteUrl" action="delete/%{localAttachmentId}" namespace="/ajax"/>
+ <s:url id="deleteUrl" action="delete/%{attachment.wikittyId}" namespace="/ajax"/>
<sj:a href="%{deleteUrl}"
targets="actionResult"
button="true"
@@ -40,6 +29,5 @@
<s:text name="vradi.attachment.delete"/>
</sj:a>
</li>
- <% }
- } %>
+ </s:iterator>
</ul>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNote.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,9 +4,7 @@
Author : poussin
--%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="org.chorem.vradi.entities.FormNote"%>
-<%@page import="org.chorem.vradi.actions.FormNoteAction"%>
<%@ page import="org.chorem.vradi.entities.FormNoteState" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
@@ -14,21 +12,11 @@
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
-<%
-FormNoteAction action = FormNoteAction.getAction();
-FormNote formNote = action.getFormNote();
-
-ActionContext.getContext().put("localNoteId", formNote.getWikittyId());
-ActionContext.getContext().put("localFieldSummary", FormNote.FQ_FIELD_FORMNOTE_SUMMARY);
-ActionContext.getContext().put("localFieldContent", FormNote.FQ_FIELD_FORMNOTE_CONTENT);
-ActionContext.getContext().put("localNote", formNote);
-ActionContext.getContext().put("localSeekingPartner", formNote.getSeekingPartner());
-ActionContext.getContext().put("localSummary", formNote.getSummary());
-ActionContext.getContext().put("localContent", formNote.getContent());
-%>
-
<!DOCTYPE html>
<html>
+ <s:set name="localNoteId" value="formNote.wikittyId"/>
+ <s:set name="localFieldSummary"><%=FormNote.FQ_FIELD_FORMNOTE_SUMMARY%></s:set>
+ <s:set name="localFieldContent"><%=FormNote.FQ_FIELD_FORMNOTE_CONTENT%></s:set>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="vradi.formNote.title" /></title>
@@ -36,7 +24,7 @@
<sj:head jquerytheme="sunny"/>
<script type="text/javascript">
function seekingPartnersChange(checkbox) {
- var url="<s:url action='edit/%{localNoteId}' namespace='/ajax'/>";
+ var url="<s:url action='edit/#localNoteId' namespace='/ajax'/>";
url = url + "?<%=FormNote.FQ_FIELD_FORMNOTE_SEEKINGPARTNER%>=" + checkbox.checked;
var xhr=new XMLHttpRequest();
xhr.open('GET', url, true);
@@ -51,7 +39,7 @@
</div>
<div>
<s:url id="closeButtonUrl"
- action="edit/%{localNoteId}"
+ action="edit/#localNoteId"
namespace="/ajax">
<s:param name="state">
<%=FormNoteState.CLOSE.getValue()%>
@@ -63,16 +51,16 @@
<s:text name="vradi.formNote.close"/>
</sj:a>
- <s:url id="deleteUrl" action="delete/%{localNoteId}" namespace="/ajax"/>
+ <s:url id="deleteUrl" action="delete/#localNoteId" namespace="/ajax"/>
<sj:a href="%{deleteUrl}"
targets="result" indicator="indicator-result"
button="true" buttonIcon="ui-icon-gear"><s:text name="vradi.delete"/></sj:a>
</div>
<div>
- <% for (String h : formNote.getHistory()) { %>
- <div><%=h%></div>
- <% } %>
+ <s:iterator value="formNote.history" var="h">
+ <div><s:property value="#h"/></div>
+ </s:iterator>
</div>
<div>
@@ -99,7 +87,7 @@
<s:text name="vradi.formNote.seekingPartner"/>
</s:set>
<s:checkbox label="%{seekingPartnerText}"
- name="formNote.seekingPartners" value="%{localSeekingPartner}"
+ name="formNote.seekingPartners" value="formNote.seekingPartner"
onchange="seekingPartnersChange(this);"/>
</div>
@@ -133,7 +121,7 @@
<s:form id="htmlSummaryEditForm" action="rst" namespace="/ajax">
<s:hidden name="id" value="%{localNoteId}"/>
<s:hidden name="field" value="%{localFieldSummary}"/>
- <s:textarea name="rst" value="%{localSummary}"/>
+ <s:textarea name="rst" value="%{formNote.summary}"/>
<sj:submit id="htmlSummaryEditSubmit"
value="%{saveText}"
targets="result"
@@ -163,7 +151,7 @@
<s:form id="htmlContentEditForm" action="rst" namespace="/ajax">
<s:hidden name="id" value="%{localNoteId}"/>
<s:hidden name="field" value="%{localFieldContent}"/>
- <s:textarea name="rst" value="%{localContent}"/>
+ <s:textarea name="rst" value="%{formNote.content}"/>
<sj:submit id="htmlContentEditSubmit"
value="%{saveText}"
targets="result"
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/formNoteList.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,17 +4,9 @@
Author : poussin
--%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
-<%@page import="org.chorem.vradi.entities.FormNote"%>
-<%@page import="org.chorem.vradi.actions.FormNoteListAction"%>
-<%@ page import="org.chorem.vradi.VradiWebHelper" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
-<%
-FormNoteListAction action = FormNoteListAction.getAction();
-%>
-
<!DOCTYPE html>
<html>
<head>
@@ -25,11 +17,13 @@
<h1><s:text name="vradi.formNoteList.title" /></h1>
<ul>
- <% for (FormNote note : action.getFormNotes()) {
- ActionContext.getContext().put("localNoteId", note.getWikittyId());
- %>
- <li><s:a action="formNote/%{localNoteId}" namespace="/"><%=VradiWebHelper.formatDate(note.getCreationDate())%> <%=note.getSummary()%></s:a></li>
- <% } %>
+ <s:iterator value="formNotes" var="note">
+ <s:set name="formatedDate" value="%{formatDate(#note.creationDate)}"/>
+ <li><s:a action="formNote/%{note.wikittyId}" namespace="/">
+ <s:property value="formatedDate"/><s:property value="summary"/>
+ </s:a>
+ </li>
+ </s:iterator>
<li><s:a action="formNote/new?formId=%{formId}" namespace="/"><s:text name="vradi.new.formNote"/></s:a></li>
</ul>
</body>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResult.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -1,28 +1,18 @@
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
-<%@ page import="org.chorem.vradi.actions.ShowInvitationAction" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
-<%
-ShowInvitationAction action = ShowInvitationAction.getAction();
-ActionContext.getContext().put("localNoteId", action.getNoteId());
-ActionContext.getContext().put("localSenderId", action.getSenderId());
-ActionContext.getContext().put("invitationResult", action.getInvitationResult());
-ActionContext.getContext().put("message", action.getMessage());
-%>
+<h1><s:property value="title"/></h1>
-<h1><%=action.getTitle()%></h1>
-
<div>
- <p><%=action.getContent()%></p>
+ <p><s:property value="%{action.content}"/></p>
</div>
<s:form action="sendInvitationResult" namespace="/" theme="simple">
- <s:hidden name="noteId" value="%{localNoteId}"/>
- <s:hidden name="senderId" value="%{localSenderId}"/>
- <s:hidden name="invitationResult" value="%{invitationResult}"/>
- <s:hidden name="message" value="%{message}"/>
+ <s:hidden name="noteId"/>
+ <s:hidden name="senderId"/>
+ <s:hidden name="invitationResult"/>
+ <s:hidden name="message"/>
<s:textarea name="messageResult"/>
<s:submit id="acceptButton" key="vradi.send"/>
</s:form>
\ No newline at end of file
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/invitationResultConfirm.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -1,30 +1,19 @@
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
-<%@ page import="org.chorem.vradi.actions.ShowInvitationResultAction" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
-<%
-ShowInvitationResultAction action = ShowInvitationResultAction.getAction();
-ActionContext.getContext().put("localNoteId", action.getNoteId());
-ActionContext.getContext().put("localSenderId", action.getSenderId());
-ActionContext.getContext().put("invitationResult", action.getInvitationResult());
-ActionContext.getContext().put("message", action.getMessage());
-ActionContext.getContext().put("messageResult", action.getMessageResult());
-%>
+<h1><s:property value="title"/></h1>
-<h1><%=action.getTitle()%></h1>
-
<div>
- <p><%=action.getContent()%></p>
+ <p><s:property value="content"/></p>
</div>
<s:form action="sendInvitationResultConfirm" namespace="/" theme="simple">
- <s:hidden name="noteId" value="%{localNoteId}"/>
- <s:hidden name="senderId" value="%{localSenderId}"/>
- <s:hidden name="invitationResult" value="%{invitationResult}"/>
- <s:hidden name="message" value="%{message}"/>
- <s:hidden name="messageResult" value="%{messageResult}"/>
+ <s:hidden name="noteId"/>
+ <s:hidden name="senderId"/>
+ <s:hidden name="invitationResult"/>
+ <s:hidden name="message"/>
+ <s:hidden name="messageResult"/>
<s:textarea name="messageConfirmResult"/>
<s:submit id="acceptButton" key="vradi.send"/>
</s:form>
\ No newline at end of file
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/savedQueries.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -1,16 +1,6 @@
-<%@ page import="com.opensymphony.xwork2.ActionContext" %>
-<%@ page import="org.chorem.vradi.entities.Query" %>
-<%@ page import="java.util.List" %>
-<%@ page import="org.chorem.vradi.actions.SavedQueriesAction" %>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags" %>
-<%
-SavedQueriesAction action = SavedQueriesAction.getAction();
-List<Query> lastQueries = action.getLastQueries();
-ActionContext.getContext().put("lastQueries", lastQueries);
-%>
-
<s:form id="queryForm" action="searchPanel" namespace="/fragment">
<s:url id="savedQueries" action="savedQueries" namespace="/ajax"/>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/seekPartners.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,21 +4,11 @@
Author : poussin
--%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
-<%@page import="org.chorem.vradi.actions.SeekPartnersAction"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
-<%
-SeekPartnersAction action = SeekPartnersAction.getAction();
-ActionContext.getContext().put("localPartners", action.getPartners());
-ActionContext.getContext().put("localNoteId", action.getNoteId());
-ActionContext.getContext().put("localNoteSummary", action.getNote().getSummary());
-
-%>
-
<!DOCTYPE html>
<html>
<head>
@@ -31,13 +21,13 @@
<h1><s:text name="vradi.seekingPartners.title" /></h1>
<s:form id="seekingPartnersForm" action="sendInvitation" namespace="/" method="POST">
- <s:hidden name="noteId" value="%{localNoteId}"/>
+ <s:hidden name="noteId"/>
<s:checkbox name="formReceiver" key="vradi.seekingPartners.formReceiver"/>
<s:checkbox name="seeker" key="vradi.seekingPartners.seeker"/>
<s:checkbox name="partners" key="vradi.seekingPartners.partners"/>
- <s:select size="5" multiple="true" name="userId" list="%{localPartners}" listKey="wikittyId" listValue="login"/>
+ <s:select size="5" multiple="true" name="userId" list="%{partners}" listKey="wikittyId" listValue="login"/>
- <s:set id="showText">
+ <s:set var="showText">
<s:text name="vradi.show"/>
</s:set>
@@ -57,7 +47,7 @@
<s:textarea name="message"
value="%{localNoteSummary}" key="vradi.userPreference.info"/>
- <s:set id="sendText">
+ <s:set var="sendText">
<s:text name="vradi.send"/>
</s:set>
<s:submit value="%{sendText}"/>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/sendInvitation.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/sendInvitation.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/sendInvitation.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,17 +4,11 @@
Author : poussin
--%>
-<%@page import="org.chorem.vradi.actions.SendInvitationAction"%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
-<%
-SendInvitationAction action = SendInvitationAction.getAction();
-%>
-
<!DOCTYPE html>
<html>
<head>
@@ -25,6 +19,6 @@
</head>
<body>
<h1><s:text name="vradi.sendInvitation.title" /></h1>
- <s:text name="vradi.sendInvitation.count" />: <%=action.getSendCount()%>
+ <s:text name="vradi.sendInvitation.count" />: <s:property value="sendCount"/>
</body>
</html>
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitation.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,20 +4,11 @@
Author : poussin
--%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
-<%@page import="org.chorem.vradi.actions.ShowInvitationAction"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
-<%
-ShowInvitationAction action = ShowInvitationAction.getAction();
-ActionContext.getContext().put("localNoteId", action.getNoteId());
-ActionContext.getContext().put("localSenderId", action.getSender().getWikittyId());
-ActionContext.getContext().put("message", action.getMessage());
-%>
-
<!DOCTYPE html>
<html>
<head>
@@ -27,12 +18,13 @@
<sj:head jquerytheme="sunny"/>
</head>
<body>
+ <s:set name="sender" value="sender"/>
<h1><s:text name="vradi.showInvitation.title" /></h1>
<div>
- <s:text name="vradi.showInvitation.from"/><%=action.getSender().getLogin()%>
+ <s:text name="vradi.showInvitation.from"/><s:property value="#sender.login"/>
<p>
- <%=action.getSenderInfo()%>
+ <s:property value="senderInfo" escapeHtml="false"/>
</p>
</div>
@@ -41,7 +33,7 @@
<form id="partnersForm" action="fragment/userInfo.action" namespace="/">
<s:select size="5" name="userId" list="partners" listKey="wikittyId" listValue="login"/>
- <s:set id="showText">
+ <s:set var="showText">
<s:text name="vradi.show"/>
</s:set>
<sj:submit id="partnersSubmit"
@@ -57,14 +49,14 @@
<div>
<s:text name="vradi.showInvitation.requestMsg"/>
- <p><%=action.getMessageRST()%></p>
+ <p><s:property value="messageRST" escapeHtml="false"/></p>
</div>
<div>
<s:form id="form" namespace="/fragment" action="invitationResult">
- <s:hidden name="noteId" value="%{localNoteId}"/>
- <s:hidden name="senderId" value="%{localSenderId}"/>
- <s:hidden name="message" value="%{message}"/>
+ <s:hidden name="noteId"/>
+ <s:hidden name="senderId" value="%{sender.wikittyId}"/>
+ <s:hidden name="message"/>
<s:url id="invitationResultUrl" namespace="/ajax" action="invitationResultButtons"/>
<sj:radio
href="%{invitationResultUrl}"
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/showInvitationResult.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,21 +4,11 @@
Author : poussin
--%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
-<%@ page import="org.chorem.vradi.actions.ShowInvitationResultAction" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
-<%
-ShowInvitationResultAction action = ShowInvitationResultAction.getAction();
-ActionContext.getContext().put("localNoteId", action.getNoteId());
-ActionContext.getContext().put("localSenderId", action.getSender().getWikittyId());
-ActionContext.getContext().put("message", action.getMessage());
-ActionContext.getContext().put("messageResult", action.getMessageResult());
-%>
-
<!DOCTYPE html>
<html>
<head>
@@ -31,30 +21,35 @@
<h1><s:text name="vradi.showInvitationConfirm.title" /></h1>
<div>
- <s:text name="vradi.showInvitationConfirm.from"/><%=action.getSender().getLogin()%>
+ <s:set name="sender" value="sender"/>
+ <s:text name="vradi.showInvitationConfirm.from"/><s:property value="%{sender.login}"/>
<p>
- <%=action.getSenderInfo()%>
+ <s:property value="senderInfo" escapeHtml="false"/>
</p>
</div>
<div>
<s:text name="vradi.showInvitationConfirm.requestMsg"/>
- <p><%=action.getMessageRST()%></p>
+ <p>
+ <s:property value="messageRST" escapeHtml="false"/>
+ </p>
</div>
<div>
<s:text name="vradi.showInvitationConfirm.requestConfirmMsg"/>
- <p><%=action.getMessageResultRST()%></p>
+ <p>
+ <s:property value="messageRST" escapeHtml="false"/>
+ </p>
</div>
<div>
<s:form id="form" namespace="/fragment" action="invitationResultConfirm">
- <s:hidden name="noteId" value="%{localNoteId}"/>
- <s:hidden name="senderId" value="%{localSenderId}"/>
- <s:hidden name="message" value="%{message}"/>
- <s:hidden name="messageResult" value="%{messageResult}"/>
+ <s:hidden name="noteId"/>
+ <s:hidden name="senderId" value="%{sender.wikittyId}"/>
+ <s:hidden name="message"/>
+ <s:hidden name="messageResult"/>
<s:url id="invitationResultConfirmUrl" namespace="/ajax" action="invitationResultConfirmButtons"/>
<sj:radio
href="%{invitationResultConfirmUrl}"
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userInfo.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userInfo.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userInfo.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,24 +4,10 @@
Author : poussin
--%>
-<%@page import="org.chorem.vradi.actions.RestoreUserAction"%>
-<%@page import="org.chorem.vradi.entities.VradiUser"%>
-<%@ page import="static org.nuiton.i18n.I18n._" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
-<%
-RestoreUserAction action = RestoreUserAction.getAction();
-VradiUser user = action.getUser();
-String email = _("vradi.noEmail");
-String info = action.getInfoHtml();
-if (user != null) {
- email = user.getLogin();
- info = action.getInfoHtml();
-}
-%>
+<a href="mailto:${user.email}"><s:property value="%{user.email}"/></a>
-<a href="mailto:<%=email%>"><%=email%></a>
-
-<div><%=info%></div>
\ No newline at end of file
+<div><s:property value="infoHtml" escapeHtml="false"/></div>
\ No newline at end of file
Modified: trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp
===================================================================
--- trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-10-11 13:07:34 UTC (rev 137)
+++ trunk/vradi-web/src/main/webapp/WEB-INF/jsp/userPreference.jsp 2011-10-11 15:25:11 UTC (rev 138)
@@ -4,8 +4,6 @@
Author : poussin
--%>
-<%@page import="org.chorem.vradi.actions.RestoreUserAction"%>
-<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="org.chorem.vradi.entities.VradiUser"%>
<%@ page import="org.chorem.vradi.entities.Infogene" %>
<%@ page import="static org.nuiton.i18n.I18n._" %>
@@ -16,18 +14,6 @@
<%@ taglib prefix="ws" uri="/wikitty-struts" %>
<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags" %>
-<%
-RestoreUserAction action = RestoreUserAction.getAction();
-VradiUser user = action.getUser();
-ActionContext.getContext().put("localUserId", user.getWikittyId());
-ActionContext.getContext().put("localUserEmail", user.getLogin());
-ActionContext.getContext().put("localUserInfo", user.getInfo());
-ActionContext.getContext().put("localUserNoSend", user.getNoSend());
-ActionContext.getContext().put("localUserNoReceived", user.getNoReceived());
-
-ActionContext.getContext().put("localVradiUserFieldInfo", VradiUser.FQ_FIELD_VRADIUSER_INFO);
-%>
-
<!DOCTYPE html>
<html>
<head>
@@ -60,6 +46,15 @@
</head>
<body>
+ <s:set name="fielUserInfo"><%=VradiUser.FQ_FIELD_VRADIUSER_INFO%></s:set>
+ <s:set name="fqFieldUserLogin"><%=VradiUser.FQ_FIELD_WIKITTYUSER_LOGIN%></s:set>
+ <s:set name="fqFieldNoSend"><%=VradiUser.FQ_FIELD_VRADIUSER_NOSEND%></s:set>
+ <s:set name="fqFieldNoReceived"><%=VradiUser.FQ_FIELD_VRADIUSER_NORECEIVED%></s:set>
+
+ <s:set name="user" value="user"/>
+ <s:set name="localUserId" value="%{user.wikittyId}"/>
+ <s:set name="proxy" value="%{getProxy()}"/>
+
<h1><s:text name="vradi.userPreference.title" /></h1>
<div id="actionResult" style="display: none;"></div>
@@ -69,11 +64,11 @@
+-->
<div>
<s:form id="infoForm" action="edit/%{localUserId}" namespace="/ajax" method="POST">
- <sj:textarea name="%{localVradiUserFieldInfo}"
- value="%{localUserInfo}"
+ <sj:textarea name="%{fielUserInfo}"
+ value="%{user.info}"
key="vradi.userPreference.info"/>
- <s:set id="saveText">
+ <s:set var="saveText">
<s:text name="vradi.save"/>
</s:set>
<sj:submit id="infoFormSubmit"
@@ -87,11 +82,11 @@
<img id="indicator-infoFormSubmit" src="/img/indicator.gif" alt="saving..." style="display:none;"/>
</div>
- <s:set id="showText">
+ <s:set var="showText">
<s:text name="vradi.show"/>
</s:set>
- <s:set id="deleteText">
+ <s:set var="deleteText">
<s:text name="vradi.delete"/>
</s:set>
@@ -105,12 +100,12 @@
<%--</ws:form>--%>
<s:form id="noSendForm" action="edit/%{localUserId}" namespace="/ajax" method="POST">
- <ws:selectAssociation proxy="<%=action.getProxy()%>"
+ <ws:selectAssociation proxy="${proxy}"
name="userId"
size="5"
- businessEntity="<%=action.getUser()%>"
- fqFieldName="<%=VradiUser.FQ_FIELD_VRADIUSER_NOSEND%>"
- descField="<%=VradiUser.FQ_FIELD_WIKITTYUSER_LOGIN%>"/>
+ businessEntity="${user}"
+ fqFieldName="${fqFieldNoSend}"
+ descField="${fqFieldUserLogin}"/>
<sj:submit
id="noSendFormShowSubmit"
@@ -143,12 +138,12 @@
<h2><s:text name="vradi.userPreference.noreceived" /></h2>
<s:form id="noReceivedForm" action="edit/%{localUserId}" namespace="/ajax" method="POST">
- <ws:selectAssociation proxy="<%=action.getProxy()%>"
+ <ws:selectAssociation proxy="${proxy}"
name="userId"
size="5"
- businessEntity="<%=action.getUser()%>"
- fqFieldName="<%=VradiUser.FQ_FIELD_VRADIUSER_NORECEIVED%>"
- descField="<%=VradiUser.FQ_FIELD_WIKITTYUSER_LOGIN%>"/>
+ businessEntity="${user}"
+ fqFieldName="${fqFieldNoReceived}"
+ descField="${fqFieldUserLogin}"/>
<sj:submit
id="noReceivedFormShowSubmit"
@@ -183,8 +178,8 @@
<ws:select name="userId"
size="5"
- entityValues="<%=action.getPartners()%>"
- descField="<%=VradiUser.FQ_FIELD_WIKITTYUSER_LOGIN%>"/>
+ entityValues="${partners}"
+ descField="${fqFieldUserLogin}"/>
<%--<s:select size="5" name="userId" list="%{localPartners}" listKey="wikittyId" listValue="login"/>--%>
<sj:submit
@@ -197,7 +192,7 @@
button="true"
/>
- <s:set id="formText">
+ <s:set var="formText">
<s:text name="vradi.userPreference.form"/>
</s:set>
<sj:submit
@@ -224,19 +219,19 @@
<s:url id="resultOpenedUrl" namespace="/ajax" action="formNoteGrid">
<s:param name="opened" value="true"/>
</s:url>
- <s:set id="creationDateText">
+ <s:set var="creationDateText">
<s:text name="vradi.form.creationDate"/>
</s:set>
- <s:set id="objetText">
+ <s:set var="objetText">
<s:text name="vradi.form.object"/>
</s:set>
- <s:set id="actionText">
+ <s:set var="actionText">
<s:text name="vradi.form.action"/>
</s:set>
- <s:set id="fqCreationDate">
+ <s:set var="fqCreationDate">
<%=Infogene.FQ_FIELD_INFOGENE_CREATIONDATE%>
</s:set>
- <s:set id="fqObjet">
+ <s:set var="fqObjet">
<%=Infogene.FQ_FIELD_INFOGENE_OBJET%>
</s:set>
1
0
r137 - trunk/vradi-web/src/main/java/org/chorem/vradi/actions
by sletellier@users.chorem.org 11 Oct '11
by sletellier@users.chorem.org 11 Oct '11
11 Oct '11
Author: sletellier
Date: 2011-10-11 15:07:34 +0200 (Tue, 11 Oct 2011)
New Revision: 137
Url: http://chorem.org/repositories/revision/vradi/137
Log:
Make vradiBaseAction extend org.nuiton.web.struts2.BaseAction
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-10-11 13:01:38 UTC (rev 136)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/actions/VradiBaseAction.java 2011-10-11 13:07:34 UTC (rev 137)
@@ -1,11 +1,7 @@
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;
@@ -13,17 +9,16 @@
import org.chorem.vradi.entities.VradiUser;
import org.chorem.vradi.services.VradiDataService;
import org.nuiton.util.ApplicationConfig;
+import org.nuiton.web.struts2.BaseAction;
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 {
+public class VradiBaseAction extends BaseAction implements SessionAware {
private static final long serialVersionUID = 1L;
@@ -41,10 +36,9 @@
protected static final String CONTEXT_ACTION_KEY = "action";
protected static final String CONTEXT_SELECTED_QUERY_KEY = "selectedQuery";
- public static final String UNTRANSLATED_MARKER = "???";
-
- protected Map<String, Object> session;
+ protected transient Map<String, Object> session;
+
@Override
public void setSession(Map<String, Object> session) {
this.session = session;
@@ -75,77 +69,4 @@
public ApplicationConfig getConfig() {
return VradiWebConfig.getConfig();
}
-
- @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
1
0
11 Oct '11
Author: sletellier
Date: 2011-10-11 15:01:38 +0200 (Tue, 11 Oct 2011)
New Revision: 136
Url: http://chorem.org/repositories/revision/vradi/136
Log:
Use cajo server
Removed:
trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java
trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java
Modified:
trunk/pom.xml
trunk/vradi-services-web/pom.xml
trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml
trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/util/ReindexService.java
trunk/vradi-services/pom.xml
trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java
trunk/vradi-swing/pom.xml
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/VradiProxy.java
trunk/vradi-web/src/main/resources/struts.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/pom.xml 2011-10-11 13:01:38 UTC (rev 136)
@@ -116,15 +116,17 @@
<!-- libraries version -->
<jaxxVersion>2.4</jaxxVersion>
+ <eugenePluginVersion>2.3.5</eugenePluginVersion>
+ <nuitonWidgetVersion>1.1.1</nuitonWidgetVersion>
<nuitonUtilsVersion>2.2</nuitonUtilsVersion>
+ <nuitonWebVersion>1.3</nuitonWebVersion>
<nuitonI18nVersion>2.4</nuitonI18nVersion>
- <nuitonWidgetVersion>1.1.1</nuitonWidgetVersion>
- <generatorPluginVersion>2.3.5</generatorPluginVersion>
- <wikittyVersion>3.2-SNAPSHOT</wikittyVersion>
+ <wikittyVersion>3.3-SNAPSHOT</wikittyVersion>
+ <slf4jVersion>1.6.1</slf4jVersion>
+ <h2Version>1.2.134</h2Version>
<jrstVersion>1.4-SNAPSHOT</jrstVersion>
<oooVersion>3.2.1</oooVersion>
<javamailVersion>1.4.3</javamailVersion>
- <slf4jVersion>1.6.1</slf4jVersion>
<struts2Version>2.2.3</struts2Version>
<struts2jqueryVersion>3.1.0</struts2jqueryVersion>
<servletApiVersion>2.5</servletApiVersion>
@@ -136,12 +138,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 configuration –>-->
+ <!--<i18n.bundles>fr_FR,en_GB</i18n.bundles>-->
+ <!--<i18n.silent>true</i18n.silent>-->
- <!-- strust allow only iso :( -->
- <i18n.bundleOutputEncoding>ISO-8859-1</i18n.bundleOutputEncoding>
+ <!--<!– strust allow only iso :( –>-->
+ <!--<i18n.bundleOutputEncoding>ISO-8859-1</i18n.bundleOutputEncoding>-->
</properties>
@@ -168,6 +170,12 @@
</dependency>
<dependency>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-struts2</artifactId>
+ <version>${nuitonWebVersion}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
<version>${nuitonI18nVersion}</version>
@@ -283,12 +291,6 @@
<dependency>
<groupId>org.nuiton.wikitty</groupId>
- <artifactId>wikitty-hessian-client</artifactId>
- <version>${wikittyVersion}</version>
- </dependency>
-
- <dependency>
- <groupId>org.nuiton.wikitty</groupId>
<artifactId>wikitty-struts</artifactId>
<version>${wikittyVersion}</version>
</dependency>
@@ -365,13 +367,6 @@
</dependency>
<dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- <version>4.0.6</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
@@ -519,7 +514,7 @@
<plugin>
<groupId>org.nuiton.eugene</groupId>
<artifactId>maven-eugene-plugin</artifactId>
- <version>${generatorPluginVersion}</version>
+ <version>${eugenePluginVersion}</version>
<dependencies>
<dependency>
<groupId>org.nuiton.wikitty</groupId>
Modified: trunk/vradi-services/pom.xml
===================================================================
--- trunk/vradi-services/pom.xml 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-services/pom.xml 2011-10-11 13:01:38 UTC (rev 136)
@@ -161,11 +161,6 @@
<artifactId>lucene-core</artifactId>
</dependency>
- <dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- </dependency>
-
</dependencies>
<build>
Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java
===================================================================
--- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiServiceFactory.java 2011-10-11 13:01:38 UTC (rev 136)
@@ -23,15 +23,13 @@
*/
package org.chorem.vradi.services;
-import com.caucho.hessian.client.HessianProxyFactory;
+import gnu.cajo.utils.extra.TransparentItemProxy;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.vradi.VradiServiceConfiguration;
import org.chorem.vradi.VradiServiceConfigurationHelper;
import org.nuiton.util.ApplicationConfig;
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.WikittyService;
-import org.nuiton.wikitty.WikittyServiceFactory;
/**
* VradiServiceFactory.
@@ -62,40 +60,38 @@
// check is it's valid url
if (isValidUrl(serviceEndpoint)) {
+ if (log.isInfoEnabled()) {
+ log.info("Use remote mode with url : " + serviceEndpoint);
+ }
+
try {
-// Cajo impl
-// String cajoEndPoint = serviceEndpoint;
-// // cajo url is not http or other protocol, url must start with //
-// // example: //localhost:1198/ws
-// // remove protocol
-// int i = cajoEndPoint.indexOf("://");
-// if (i >= 0) {
-// cajoEndPoint = serviceEndpoint.substring(i+1);
-// }
-// int servicePort = VradiServiceConfigurationHelper.getServicePort(config);
-// serviceEndpoint = getServiceURL(cajoEndPoint, servicePort, VradiStorageService.VRADI_SERVICE);
-//
-// if (log.isInfoEnabled()) {
-// log.info("Use remote mode with url : " + serviceEndpoint);
-// }
-// result = (VradiStorageService) TransparentItemProxy.getItem(
-// serviceEndpoint, new Class[]{VradiStorageService.class});
- if (log.isInfoEnabled()) {
- log.info("Use remote mode with url : " + serviceEndpoint);
+ String cajoEndPoint = serviceEndpoint;
+ // cajo url is not http or other protocol, url must start with //
+ // example: //localhost:1198/ws
+ // remove protocol
+ int i = cajoEndPoint.indexOf("://");
+ if (i >= 0) {
+ cajoEndPoint = serviceEndpoint.substring(i+1);
}
+ int servicePort = VradiServiceConfigurationHelper.getServicePort(config);
+ serviceEndpoint = getServiceURL(cajoEndPoint, servicePort, VradiStorageService.VRADI_SERVICE);
- HessianProxyFactory factory = new HessianProxyFactory();
- // Fix : com.caucho.hessian.io.HessianProtocolException: '���' is an unknown code
- factory.setHessian2Request(true);
- // pour que les méthodes aux noms dupliquées fonctionnent (arguments different)
- factory.setOverloadEnabled(true);
+ result = (VradiStorageService) TransparentItemProxy.getItem(
+ serviceEndpoint, new Class[]{VradiStorageService.class});
- // vradi service
- result = (VradiStorageService) factory.
- create(VradiStorageService.class,
- getServiceURL(serviceEndpoint, VradiStorageService.VRADI_SERVICE));
+// HessianProxyFactory factory = new HessianProxyFactory();
+// // Fix : com.caucho.hessian.io.HessianProtocolException: '���' is an unknown code
+// factory.setHessian2Request(true);
+// // pour que les méthodes aux noms dupliquées fonctionnent (arguments different)
+// factory.setOverloadEnabled(true);
+//
+// // vradi service
+// result = (VradiStorageService) factory.
+// create(VradiStorageService.class,
+// getServiceURL(serviceEndpoint, VradiStorageService.VRADI_SERVICE));
+
} catch (Exception eee) {
if (log.isErrorEnabled()) {
log.error("Can't init remote proxy", eee);
@@ -120,10 +116,11 @@
/**
* Get wikittyService instanciate by vradiService
*
+ * @param vradiService of application
* @return wikittyService instanciate
*/
- public static WikittyService getWikittyService(ApplicationConfig config) {
- return WikittyServiceFactory.buildWikittyService(config);
+ public static WikittyService getWikittyService(VradiStorageService vradiService) {
+ return vradiService.getWikittyService();
}
/**
@@ -141,8 +138,9 @@
FileService fileService;
String serviceEndpoint = VradiServiceConfigurationHelper.getRemoteEndpoint(config);
if (isValidUrl(serviceEndpoint)) {
+ int servletPort = VradiServiceConfigurationHelper.getServletPort(config);
// file service
- String fileServiceUrl = getServiceURL(serviceEndpoint, "file");
+ String fileServiceUrl = getServiceURL(serviceEndpoint, servletPort, "file");
log.info("File service url : " + fileServiceUrl);
fileService = new FileServiceProxy(fileServiceUrl);
} else {
@@ -162,9 +160,14 @@
* @param serviceEndUrl service small name
* @return service full url
*/
- protected static String getServiceURL(String serviceEndpoint, String serviceEndUrl) {
+ protected static String getServiceURL(String serviceEndpoint, int port, String serviceEndUrl) {
String fullUrl = serviceEndpoint;
+ // Add port if != 0
+ if (port != 0) {
+ fullUrl += ":" + port;
+ }
+
// Warn hessian won't work with double /
if (!fullUrl.endsWith("/")) {
fullUrl += "/";
Modified: trunk/vradi-services-web/pom.xml
===================================================================
--- trunk/vradi-services-web/pom.xml 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-services-web/pom.xml 2011-10-11 13:01:38 UTC (rev 136)
@@ -47,11 +47,6 @@
</dependency>
<dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- </dependency>
-
- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
Deleted: trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java
===================================================================
--- trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-services-web/src/main/java/org/chorem/vradi/services/VradiWikittyServiceDelegator.java 2011-10-11 13:01:38 UTC (rev 136)
@@ -1,48 +0,0 @@
-/*
- * #%L
- * Vradi :: Services Web
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2010 Codelutin, Chatellier Eric
- * %%
- * 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%
- */
-
-package org.chorem.vradi.services;
-
-import org.chorem.vradi.VradiServiceConfiguration;
-import org.nuiton.wikitty.services.WikittyServiceDelegator;
-
-/**
- * Wikitty proxy delegator.
- * <p/>
- * This delegator exist only because we cannot put instance as hessian service.
- * <p/>
- * This delegator just delegate everything to a static real wikitty service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-public class VradiWikittyServiceDelegator extends WikittyServiceDelegator {
-
- public VradiWikittyServiceDelegator() {
- super(VradiServiceFactory.getWikittyService(VradiServiceConfiguration.getConfig()));
- }
-}
Modified: trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-services-web/src/main/webapp/WEB-INF/web.xml 2011-10-11 13:01:38 UTC (rev 136)
@@ -30,52 +30,54 @@
<display-name>Vradi</display-name>
<servlet>
- <servlet-name>vradiStorageServlet</servlet-name>
- <servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>
- <init-param>
- <param-name>home-api</param-name>
- <param-value>org.chorem.vradi.services.VradiStorageService</param-value>
- </init-param>
- <init-param>
- <param-name>home-class</param-name>
- <param-value>org.chorem.vradi.services.VradiStorageServiceImpl
- </param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet>
- <servlet-name>wikittyServiceServlet</servlet-name>
- <servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>
- <init-param>
- <param-name>home-api</param-name>
- <param-value>org.nuiton.wikitty.WikittyService</param-value>
- </init-param>
- <init-param>
- <param-name>home-class</param-name>
- <param-value>org.chorem.vradi.services.VradiWikittyServiceDelegator
- </param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
- <servlet>
<servlet-name>fileServlet</servlet-name>
<servlet-class>org.chorem.vradi.services.FileServlet</servlet-class>
</servlet>
- <servlet-mapping>
- <servlet-name>vradiStorageServlet</servlet-name>
- <url-pattern>/vradiservice</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>wikittyServiceServlet</servlet-name>
- <url-pattern>/wikittyservice</url-pattern>
- </servlet-mapping>
+ <!-- For hessian-->
+ <!--<servlet>-->
+ <!--<servlet-name>vradiStorageServlet</servlet-name>-->
+ <!--<servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>-->
+ <!--<init-param>-->
+ <!--<param-name>home-api</param-name>-->
+ <!--<param-value>org.chorem.vradi.services.VradiStorageService</param-value>-->
+ <!--</init-param>-->
+ <!--<init-param>-->
+ <!--<param-name>home-class</param-name>-->
+ <!--<param-value>org.chorem.vradi.services.VradiStorageServiceImpl-->
+ <!--</param-value>-->
+ <!--</init-param>-->
+ <!--<load-on-startup>1</load-on-startup>-->
+ <!--</servlet>-->
+ <!--<servlet>-->
+ <!--<servlet-name>wikittyServiceServlet</servlet-name>-->
+ <!--<servlet-class>com.caucho.hessian.server.HessianServlet</servlet-class>-->
+ <!--<init-param>-->
+ <!--<param-name>home-api</param-name>-->
+ <!--<param-value>org.nuiton.wikitty.WikittyService</param-value>-->
+ <!--</init-param>-->
+ <!--<init-param>-->
+ <!--<param-name>home-class</param-name>-->
+ <!--<param-value>org.chorem.vradi.services.VradiWikittyServiceDelegator-->
+ <!--</param-value>-->
+ <!--</init-param>-->
+ <!--<load-on-startup>2</load-on-startup>-->
+ <!--</servlet>-->
+ <!--<servlet-mapping>-->
+ <!--<servlet-name>vradiStorageServlet</servlet-name>-->
+ <!--<url-pattern>/vradiservice</url-pattern>-->
+ <!--</servlet-mapping>-->
+ <!--<servlet-mapping>-->
+ <!--<servlet-name>wikittyServiceServlet</servlet-name>-->
+ <!--<url-pattern>/wikittyservice</url-pattern>-->
+ <!--</servlet-mapping>-->
+
<!-- Used for cajo -->
- <!--<listener>-->
- <!--<description>Init</description>-->
- <!--<listener-class>org.chorem.vradi.ApplicationListener</listener-class>-->
- <!--</listener>-->
+ <listener>
+ <description>Init</description>
+ <listener-class>org.chorem.vradi.ApplicationListener</listener-class>
+ </listener>
<servlet-mapping>
<servlet-name>fileServlet</servlet-name>
Deleted: trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java
===================================================================
--- trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java 2011-10-11 13:01:38 UTC (rev 136)
@@ -1,204 +0,0 @@
-/*
- * #%L
- * Vradi :: Services Web
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 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%
- */
-package org.chorem.vradi.services;
-
-import com.caucho.hessian.client.HessianProxyFactory;
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.vradi.VradiConstants;
-import org.chorem.vradi.beans.XmlStreamImportResult;
-import org.chorem.vradi.entities.Session;
-import org.chorem.vradi.entities.SessionImpl;
-import org.chorem.vradi.entities.XmlFieldBinding;
-import org.chorem.vradi.entities.XmlStream;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.mortbay.jetty.runner.Runner;
-import org.nuiton.util.Resource;
-import org.nuiton.wikitty.WikittyProxy;
-import org.nuiton.wikitty.WikittyService;
-import org.nuiton.wikitty.WikittyUtil;
-import org.nuiton.wikitty.entities.WikittyExtension;
-
-import java.net.URL;
-import java.util.Date;
-import java.util.List;
-
-/**
- * VradiHessianStorageTest.
- *
- * @author $Author$
- * @version $Revision$ $Date$
- * @since 21 févr. 2010 02:13:16
- *
- * TODO echatellier 20110629 test desactivé car toujours en echec
- * je pense que les wikitty service coté serveur ne s'initialise pas
- * avec la bonne configuration, donc tous les tests qui utilisent
- * l'index solr ne cherche pas là où il faut
- */
-@Ignore
-public class VradiHessianStorageTest extends VradiStorageServiceTest {
- static final Log log = LogFactory.getLog(VradiHessianStorageTest.class);
-
- static final String port = "9000";
-
- static final String clearUrl = "http://localhost:" + port + "/clearservice";
-
- static final String storageUrl = "http://localhost:" + port + "/vradiservice";
-
- static final String wikittyUrl = "http://localhost:" + port + "/wikittyservice";
-
- static final String fileUrl = "http://localhost:" + port + "/file";
-
- static VradiJettyRunner runner;
-
- public static class VradiJettyRunner extends Runner {
- @Override
- public void run() throws Exception {
- _server.start();
- // Skip join
- }
-
- public void stop() throws Exception {
- _server.stop();
- }
- }
-
- @BeforeClass
- public static void startServer() throws Exception {
-
- runner = new VradiJettyRunner();
-
- // This is the file to find to get the path of vradi-services-web module
- String placeHolder = "/vradi_services_web.place_holder";
-
- // Find the file
- URL url = Resource.getURL(placeHolder);
-
- // Remove the file name and folder 'target/test-classes'
- String contextPath = url.toString();
- String target = "/target/test-classes";
- contextPath = contextPath.substring(0, contextPath.length() - (placeHolder.length() + target.length()));
-
- // Add webapp context
- contextPath += "/src/test/webapp";
- String[] args = {"--port", port, contextPath};
- runner.configure(args);
-
- runner.run();
- }
-
- @AfterClass
- public static void stopServer() throws Exception {
- runner.stop();
- }
-
- @Override
- @Before
- public void clear() throws Exception {
- HessianProxyFactory factory = new HessianProxyFactory();
- factory.setHessian2Request(true);
- factory.setOverloadEnabled(true);
-
- log.debug("--clear-----------------------------------------");
- ClearService clearService = (ClearService) factory.create(ClearService.class, clearUrl);
- clearService.clear();
- storageService = (VradiStorageService) factory.create(VradiStorageService.class, storageUrl);
- WikittyService wikittyService = (WikittyService) factory.create(WikittyService.class, wikittyUrl);
- wikittyProxy = new WikittyProxy(wikittyService);
- dataService = new VradiDataServiceImpl(config, wikittyProxy);
-
- // fait avec le proxy > servlet pour tester
- fileService = new FileServiceProxy(fileUrl);
- }
-
- @Override
- protected XmlStreamImportResult initData(WikittyExtension extension)
- throws Exception {
- List<XmlFieldBinding> bindings = createXmlBindings(extension);
- XmlStream xmlStream = createXmlStream(extension, bindings);
- return storageService.importFormsFromXmlStream(xmlStream);
- }
-
- /*
- * TODO add doc about this test !!!
- *
- */
- @Test
- public void testPropagation() throws Exception {
-
- Session session = new SessionImpl();
-
- session.setNum(7);
- wikittyProxy.getWikitty(session).addExtension(
- new WikittyExtension("ouaf", "2.0", (String)null,
- WikittyUtil.buildFieldMapExtension(
- "Numeric a",
- "Numeric b",
- "String c")));
- session.setSessionDate(new Date());
-
- session.setStatus(VradiConstants.SessionStatus.ACTIVE.getValue());
-
- session = wikittyProxy.store(session);
-
- session.setField("ouaf", "a", 1);
- session.setField("ouaf", "b", 1.0);
- session.setField("ouaf", "c", "Ouaf");
- session.setNum(1);
- session.setSessionDate(DateUtils.addMinutes(new Date(), 15));
- Session sessionService = wikittyProxy.store(session);
-
- if (session.getWikittyId().equals(sessionService.getWikittyId())) {
- int scInt = wikittyProxy.getWikitty(sessionService).getFieldAsInt("ouaf", "a");
- int lcInt = wikittyProxy.getWikitty(session).getFieldAsInt("ouaf", "a");
-
- Float scFloat = wikittyProxy.getWikitty(sessionService).getFieldAsFloat("ouaf", "b");
- Float lcFloat = wikittyProxy.getWikitty(session).getFieldAsFloat("ouaf", "b");
-
- String scString = wikittyProxy.getWikitty(sessionService).getFieldAsString("ouaf", "c");
- String lcString = wikittyProxy.getWikitty(session).getFieldAsString("ouaf", "c");
-
- log.info("testPropagation result, local : " + session.getNum() + " serveur : " + sessionService.getNum());
- log.info("testPropagation result as int, local : " + lcInt + " serveur : " + scInt);
- log.info("testPropagation result as float, local : " + lcFloat + " serveur : " + scFloat);
- log.info("testPropagation result as String, local : " + lcString + " serveur : " + scString);
- log.info("testPropagation result, local : " + session.getSessionDate() + " serveur : " + sessionService.getSessionDate());
-
- Assert.assertEquals(session.getNum(), sessionService.getNum());
- Assert.assertEquals(lcInt, scInt);
- Assert.assertEquals(lcFloat, scFloat);
- Assert.assertEquals(lcString, scString);
- Assert.assertEquals(session.getSessionDate(), sessionService.getSessionDate());
- }
-
- wikittyProxy.delete(session.getWikittyId());
- }
-
-}
Modified: trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/util/ReindexService.java
===================================================================
--- trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/util/ReindexService.java 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/util/ReindexService.java 2011-10-11 13:01:38 UTC (rev 136)
@@ -24,10 +24,13 @@
package org.chorem.vradi.services.util;
-import com.caucho.hessian.client.HessianProxyFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.vradi.VradiServiceConfiguration;
import org.chorem.vradi.entities.Thesaurus;
+import org.chorem.vradi.services.VradiServiceFactory;
+import org.chorem.vradi.services.VradiStorageService;
+import org.nuiton.util.ApplicationConfig;
import org.nuiton.util.StringUtil;
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.WikittyService;
@@ -57,13 +60,13 @@
public static void main(String... args) throws MalformedURLException {
- HessianProxyFactory factory = new HessianProxyFactory();
- factory.setHessian2Request(true);
- factory.setOverloadEnabled(true);
+ ApplicationConfig config = VradiServiceConfiguration.getConfig();
+ VradiStorageService vradiStorageService = VradiServiceFactory.getVradiServiceStorage(config);
- WikittyService wikittyService = (WikittyService) factory.create(WikittyService.class, wikittyUrl);
- WikittyProxy wikittyProxy = new WikittyProxy(wikittyService);
+ WikittyService wikittyService = VradiServiceFactory.getWikittyService(vradiStorageService);
+ WikittyProxy wikittyProxy = VradiServiceFactory.getProxy(wikittyService);
+
//synEngin(wikittyProxy);
//deleteObseleteThesaurus(wikittyProxy);
}
Modified: trunk/vradi-swing/pom.xml
===================================================================
--- trunk/vradi-swing/pom.xml 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-swing/pom.xml 2011-10-11 13:01:38 UTC (rev 136)
@@ -86,12 +86,6 @@
</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>
</dependency>
@@ -112,11 +106,6 @@
</dependency>
<dependency>
- <groupId>com.caucho</groupId>
- <artifactId>hessian</artifactId>
- </dependency>
-
- <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<scope>runtime</scope>
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-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-swing/src/main/java/org/chorem/vradi/services/VradiService.java 2011-10-11 13:01:38 UTC (rev 136)
@@ -65,7 +65,7 @@
vradiStorageService = VradiServiceFactory.getVradiServiceStorage(configuration);
- wikittyService = VradiServiceFactory.getWikittyService(configuration);
+ wikittyService = VradiServiceFactory.getWikittyService(vradiStorageService);
fileService = VradiServiceFactory.getFileService(configuration);
Modified: trunk/vradi-web/pom.xml
===================================================================
--- trunk/vradi-web/pom.xml 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-web/pom.xml 2011-10-11 13:01:38 UTC (rev 136)
@@ -70,6 +70,11 @@
</dependency>
<dependency>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-struts2</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton.wikitty</groupId>
<artifactId>wikitty-api</artifactId>
</dependency>
@@ -189,12 +194,6 @@
</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>
Modified: trunk/vradi-web/src/main/java/org/chorem/vradi/VradiProxy.java
===================================================================
--- trunk/vradi-web/src/main/java/org/chorem/vradi/VradiProxy.java 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-web/src/main/java/org/chorem/vradi/VradiProxy.java 2011-10-11 13:01:38 UTC (rev 136)
@@ -4,6 +4,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.vradi.entities.Attachment;
+import org.chorem.vradi.services.VradiServiceFactory;
+import org.chorem.vradi.services.VradiStorageService;
import org.nuiton.util.ApplicationConfig;
import org.nuiton.wikitty.WikittyProxy;
import org.nuiton.wikitty.WikittyService;
@@ -56,7 +58,8 @@
if (ws == null) {
synchronized(VradiProxy.class) {
if (ws == null) {
- ws = WikittyServiceFactory.buildWikittyService(config);
+ VradiStorageService vradiServiceStorage = VradiServiceFactory.getVradiServiceStorage(config);
+ ws = VradiServiceFactory.getWikittyService(vradiServiceStorage);
}
}
}
Modified: trunk/vradi-web/src/main/resources/struts.xml
===================================================================
--- trunk/vradi-web/src/main/resources/struts.xml 2011-09-22 17:32:28 UTC (rev 135)
+++ trunk/vradi-web/src/main/resources/struts.xml 2011-10-11 13:01:38 UTC (rev 136)
@@ -4,6 +4,11 @@
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
+
+ <bean class="org.nuiton.web.struts2.I18nTextProvider" name="i18nTextProvider"
+ type="com.opensymphony.xwork2.TextProvider" />
+ <constant name="struts.xworkTextProvider" value="i18nTextProvider" />
+
<constant name="struts.enable.SlashesInActionNames" value="true"/>
<constant name="struts.ognl.allowStaticMethodAccess" value="true"/>
1
0
Author: maven-release
Date: 2011-09-22 19:32:28 +0200 (Thu, 22 Sep 2011)
New Revision: 135
Url: http://chorem.org/repositories/revision/vradi/135
Log:
Update mavenpom4redmine to 3.0.4.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-09-09 16:14:43 UTC (rev 134)
+++ trunk/pom.xml 2011-09-22 17:32:28 UTC (rev 135)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.0.3</version>
+ <version>3.0.4</version>
</parent>
<groupId>org.chorem</groupId>
1
0
Author: tchemit
Date: 2011-09-09 18:14:43 +0200 (Fri, 09 Sep 2011)
New Revision: 134
Url: http://chorem.org/repositories/revision/vradi/134
Log:
use new site deployment configuration
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-09-09 16:10:12 UTC (rev 133)
+++ trunk/pom.xml 2011-09-09 16:14:43 UTC (rev 134)
@@ -101,9 +101,15 @@
<url>http://www.chorem.org/repositories/browse/vradi/trunk</url>
</scm>
+ <distributionManagement>
+ <site>
+ <id>${platform}</id>
+ <url>${our.site.repository}/${projectId}</url>
+ </site>
+ </distributionManagement>
+
<packaging>pom</packaging>
-
<properties>
<platform>chorem.org</platform>
<projectId>vradi</projectId>
1
0
Author: tchemit
Date: 2011-09-09 18:10:12 +0200 (Fri, 09 Sep 2011)
New Revision: 133
Url: http://chorem.org/repositories/revision/vradi/133
Log:
Update mavenpom4redmine to 3.0.3.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-19 16:31:47 UTC (rev 132)
+++ trunk/pom.xml 2011-09-09 16:10:12 UTC (rev 133)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.0.2</version>
+ <version>3.0.3</version>
</parent>
<groupId>org.chorem</groupId>
1
0
Author: tchemit
Date: 2011-08-19 18:31:47 +0200 (Fri, 19 Aug 2011)
New Revision: 132
Url: http://chorem.org/repositories/revision/vradi/132
Log:
Update mavenpom4redmine to 3.0.2.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-18 06:56:45 UTC (rev 131)
+++ trunk/pom.xml 2011-08-19 16:31:47 UTC (rev 132)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.0.1</version>
+ <version>3.0.2</version>
</parent>
<groupId>org.chorem</groupId>
1
0
r131 - in trunk: vradi-entities/src/license vradi-services/src/license vradi-services-web/src/license vradi-swing/src/license vradi-web/src vradi-web/src/license
by tchemit@users.chorem.org 18 Aug '11
by tchemit@users.chorem.org 18 Aug '11
18 Aug '11
Author: tchemit
Date: 2011-08-18 08:56:45 +0200 (Thu, 18 Aug 2011)
New Revision: 131
Url: http://chorem.org/repositories/revision/vradi/131
Log:
update third-parties
Added:
trunk/vradi-web/src/license/
trunk/vradi-web/src/license/THIRD-PARTY.properties
Modified:
trunk/vradi-entities/src/license/THIRD-PARTY.properties
trunk/vradi-services-web/src/license/THIRD-PARTY.properties
trunk/vradi-services/src/license/THIRD-PARTY.properties
trunk/vradi-swing/src/license/THIRD-PARTY.properties
Modified: trunk/vradi-entities/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/vradi-entities/src/license/THIRD-PARTY.properties 2011-08-18 06:30:43 UTC (rev 130)
+++ trunk/vradi-entities/src/license/THIRD-PARTY.properties 2011-08-18 06:56:45 UTC (rev 131)
@@ -1,25 +1,27 @@
-# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache 2
# - Apache Software License, Version 2.0
# - Apache Software License, version 1.1
# - BSD License
# - BSD style
-# - Indiana University Extreme! Lab Software License
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Java Transaction API (JTA) License
-# - LGPL 2.1
# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
# - Public Domain
# - Public domain
+# - TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
# - The Apache Software License, Version 2.0
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Thu Dec 23 16:48:32 CET 2010
-commons-primitives--commons-primitives--1.0--jar=Apache Software License, Version 2.0
-concurrent--concurrent--1.0--jar=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
-javax.transaction--jta--1.1--jar=Java Transaction API (JTA) License
-xpp3--xpp3_min--1.1.3.4.O--jar=Indiana University Extreme\! Lab Software License
+#Thu Aug 18 08:42:56 CEST 2011
+commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+concurrent--concurrent--1.0=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
+javax.transaction--jta--1.1=Java Transaction API (JTA) License
+xpp3--xpp3_min--1.1.3.4.O=Indiana University Extreme\! Lab Software License
Modified: trunk/vradi-services/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/vradi-services/src/license/THIRD-PARTY.properties 2011-08-18 06:30:43 UTC (rev 130)
+++ trunk/vradi-services/src/license/THIRD-PARTY.properties 2011-08-18 06:56:45 UTC (rev 131)
@@ -1,7 +1,6 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache 2
# - Apache License
# - Apache Software License, Version 1.1
# - Apache Software License, Version 2.0
@@ -10,44 +9,43 @@
# - BSD style
# - CDDL
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-# - Common Development and Distribution License (CDDL) v1.0
# - Common Public License Version 1.0
# - GNU Affero General Public License version 3
-# - GNU LESSER GENERAL PUBLIC LICENSE
# - GNU Lesser General Public License, Version 3
# - GPLv2+CE
-# - Indiana University Extreme! Lab Software License
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - JDom license
# - Java Transaction API (JTA) License
-# - LGPL 2.1
# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
# - MIT License
# - Mozilla Public License
# - Mozilla Public License Version 1.0
# - Public Domain
# - Public domain
# - TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
+# - The Apache Software License, Version 1.1
# - The Apache Software License, Version 2.0
# - The H2 License, Version 1.0
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Mon May 09 18:06:24 CEST 2011
-commons-cli--commons-cli--1.2--jar=Apache Software License, Version 2.0
-commons-primitives--commons-primitives--1.0--jar=Apache Software License, Version 2.0
-concurrent--concurrent--1.0--jar=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
-antlr--antlr--2.7.2--jar=BSD License
-dom4j--dom4j--1.1--jar=BSD License
-jakarta-regexp--jakarta-regexp--1.4--jar=The Apache Software License, Version 2.0
-org.apache.zookeeper--zookeeper--3.3.1--jar=The Apache Software License, Version 2.0
-oro--oro--2.0.8--jar=The Apache Software License, Version 2.0
-groovy--groovy-all--1.0-jsr-06--jar=Apache Software License, Version 2.0
-javax.servlet--servlet-api--2.5--jar=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-javax.transaction--jta--1.1--jar=Java Transaction API (JTA) License
-jboss--jnet--3.2.1--jar=GNU Lesser General Public License, Version 3
-org.apache.commons--commons-email--1.2--jar=Apache Software License, Version 2.0
-org.jdom--jdom--1.1--jar=JDom license
-rome--rome--1.0--jar=Apache Software License, Version 2.0
-xpp3--xpp3_min--1.1.3.4.O--jar=Indiana University Extreme\! Lab Software License
+#Thu Aug 18 08:43:06 CEST 2011
+antlr--antlr--2.7.2=BSD License
+commons-cli--commons-cli--1.2=Apache Software License, Version 2.0
+commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+concurrent--concurrent--1.0=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
+dom4j--dom4j--1.1=BSD License
+groovy--groovy-all--1.0-jsr-06=Apache Software License, Version 2.0
+jakarta-regexp--jakarta-regexp--1.4=The Apache Software License, Version 2.0
+javax.servlet--servlet-api--2.5=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+javax.transaction--jta--1.1=Java Transaction API (JTA) License
+jboss--jnet--3.2.1=GNU Lesser General Public License, Version 3
+org.apache.commons--commons-email--1.2=Apache Software License, Version 2.0
+org.apache.zookeeper--zookeeper--3.3.1=The Apache Software License, Version 2.0
+org.jdom--jdom--1.1=JDom license
+oro--oro--2.0.8=The Apache Software License, Version 2.0
+rome--rome--1.0=Apache Software License, Version 2.0
+xpp3--xpp3_min--1.1.3.4.O=Indiana University Extreme\! Lab Software License
Modified: trunk/vradi-services-web/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/vradi-services-web/src/license/THIRD-PARTY.properties 2011-08-18 06:30:43 UTC (rev 130)
+++ trunk/vradi-services-web/src/license/THIRD-PARTY.properties 2011-08-18 06:56:45 UTC (rev 131)
@@ -1,7 +1,6 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache 2
# - Apache License
# - Apache Software License - Version 2.0
# - Apache Software License, Version 1.1
@@ -11,20 +10,19 @@
# - BSD style
# - CDDL
# - CDDL 1.0
-# - Common Development and Distribution License (CDDL) v1.0
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
# - Eclipse Public License - Version 1.0
# - Eclipse Public License v1.0
# - GNU Affero General Public License version 3
-# - GNU LESSER GENERAL PUBLIC LICENSE
# - GNU Lesser General Public License, Version 3
# - GPLv2+CE
-# - Indiana University Extreme! Lab Software License
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - JDom license
# - Java Transaction API (JTA) License
-# - LGPL 2.1
# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
# - License Agreement for Java(TM) Servlet API Specification Interface Classes
# - MIT License
# - Mozilla Public License
@@ -39,20 +37,20 @@
# Please fill the missing licenses for dependencies :
#
#
-#Mon May 09 18:13:59 CEST 2011
-antlr--antlr--2.7.2--jar=BSD License
-commons-cli--commons-cli--1.2--jar=Apache Software License, Version 2.0
-commons-primitives--commons-primitives--1.0--jar=Apache Software License, Version 2.0
-concurrent--concurrent--1.0--jar=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
-dom4j--dom4j--1.1--jar=BSD License
-groovy--groovy-all--1.0-jsr-06--jar=Apache Software License, Version 2.0
-jakarta-regexp--jakarta-regexp--1.4--jar=The Apache Software License, Version 2.0
-javax.servlet--servlet-api--2.5--jar=License Agreement for Java(TM) Servlet API Specification Interface Classes
-javax.transaction--jta--1.1--jar=Java Transaction API (JTA) License
-jboss--jnet--3.2.1--jar=GNU Lesser General Public License, Version 3
-org.apache.commons--commons-email--1.2--jar=Apache Software License, Version 2.0
-org.apache.zookeeper--zookeeper--3.3.1--jar=The Apache Software License, Version 2.0
-org.jdom--jdom--1.1--jar=JDom license
-oro--oro--2.0.8--jar=The Apache Software License, Version 2.0
-rome--rome--1.0--jar=Apache Software License, Version 2.0
-xpp3--xpp3_min--1.1.3.4.O--jar=Indiana University Extreme\! Lab Software License
+#Thu Aug 18 08:43:50 CEST 2011
+antlr--antlr--2.7.2=BSD License
+commons-cli--commons-cli--1.2=Apache Software License, Version 2.0
+commons-primitives--commons-primitives--1.0=Apache Software License, Version 2.0
+concurrent--concurrent--1.0=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
+dom4j--dom4j--1.1=BSD License
+groovy--groovy-all--1.0-jsr-06=Apache Software License, Version 2.0
+jakarta-regexp--jakarta-regexp--1.4=The Apache Software License, Version 2.0
+javax.servlet--servlet-api--2.5=License Agreement for Java(TM) Servlet API Specification Interface Classes
+javax.transaction--jta--1.1=Java Transaction API (JTA) License
+jboss--jnet--3.2.1=GNU Lesser General Public License, Version 3
+org.apache.commons--commons-email--1.2=Apache Software License, Version 2.0
+org.apache.zookeeper--zookeeper--3.3.1=The Apache Software License, Version 2.0
+org.jdom--jdom--1.1=JDom license
+oro--oro--2.0.8=The Apache Software License, Version 2.0
+rome--rome--1.0=Apache Software License, Version 2.0
+xpp3--xpp3_min--1.1.3.4.O=Indiana University Extreme\! Lab Software License
Modified: trunk/vradi-swing/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/vradi-swing/src/license/THIRD-PARTY.properties 2011-08-18 06:30:43 UTC (rev 130)
+++ trunk/vradi-swing/src/license/THIRD-PARTY.properties 2011-08-18 06:56:45 UTC (rev 131)
@@ -1,7 +1,6 @@
# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache 2
# - Apache License
# - Apache Software License - Version 2.0
# - Apache Software License, Version 1.1
@@ -10,21 +9,19 @@
# - BSD License
# - BSD style
# - CDDL
-# - Common Development and Distribution License (CDDL) v1.0
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - Common Public License Version 1.0
# - Eclipse Public License - Version 1.0
# - GNU Affero General Public License version 3
-# - GNU LESSER GENERAL PUBLIC LICENSE
-# - GNU Lesser General Public License
# - GNU Lesser General Public License, Version 3
# - GPLv2+CE
-# - Indiana University Extreme! Lab Software License
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
-# - LGPL 2.1
# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
-# - Lesser General Public License v2.1,Mozilla Public License 1.1 (MPL)
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
# - MIT License
+# - MPL 1.1
# - Mozilla Public License
# - Mozilla Public License Version 1.0
# - Public Domain
@@ -33,29 +30,30 @@
# - The Apache Software License, Version 1.1
# - The Apache Software License, Version 2.0
# - The H2 License, Version 1.0
-# - The OpenSymphony Software License 1.1
+# - http://asm.ow2.org/license.html
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Mon May 09 18:39:13 CEST 2011
-antlr--antlr--2.7.2--jar=BSD License
-commons-cli--commons-cli--1.2--jar=Apache License, Version 2.0
-commons-codec--commons-codec--1.2--jar=Apache License, Version 2.0
-commons-jxpath--commons-jxpath--1.3--jar=Apache License, Version 2.0
-commons-primitives--commons-primitives--1.0--jar=Apache License, Version 2.0
-concurrent--concurrent--1.0--jar=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
-dom4j--dom4j--1.1--jar=BSD License
-groovy--groovy-all--1.0-jsr-06--jar=BSD / Apache
-jakarta-regexp--jakarta-regexp--1.4--jar=The Apache Software License, Version 2.0
-javassist--javassist--3.8.0.GA--jar=Lesser General Public License v2.1,Mozilla Public License 1.1 (MPL)
-javax.servlet--servlet-api--2.5--jar=Common Development and Distribution License (CDDL) v1.0
-javax.transaction--jta--1.1--jar=Common Development and Distribution License (CDDL) v1.0
-jboss--jnet--3.2.1--jar=GNU LESSER GENERAL PUBLIC LICENSE
-ognl--ognl--3.0--jar=The OpenSymphony Software License 1.1
-org.apache.commons--commons-email--1.2--jar=Apache License, Version 2.0
-org.apache.zookeeper--zookeeper--3.3.1--jar=The Apache Software License, Version 2.0
-org.jdom--jdom--1.1--jar=Apache License
-oro--oro--2.0.8--jar=The Apache Software License, Version 2.0
-rome--rome--1.0--jar=Apache Software License - Version 2.0
-xpp3--xpp3_min--1.1.3.4.O--jar=Indiana University Extreme\! Lab Software License
+#Thu Aug 18 08:55:35 CEST 2011
+antlr--antlr--2.7.2=BSD License
+asm--asm--3.1=http\://asm.ow2.org/license.html
+asm--asm-commons--3.1=http\://asm.ow2.org/license.html
+asm--asm-tree--3.1=http\://asm.ow2.org/license.html
+commons-cli--commons-cli--1.2=Apache License, Version 2.0
+commons-codec--commons-codec--1.2=Apache License, Version 2.0
+commons-jxpath--commons-jxpath--1.3=Apache License, Version 2.0
+commons-primitives--commons-primitives--1.0=Apache License, Version 2.0
+concurrent--concurrent--1.0=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
+dom4j--dom4j--1.1=BSD License
+groovy--groovy-all--1.0-jsr-06=BSD / Apache
+jakarta-regexp--jakarta-regexp--1.4=The Apache Software License, Version 2.0
+javax.servlet--servlet-api--2.5=Common Development and Distribution License (CDDL) v1.0
+javax.transaction--jta--1.1=Common Development and Distribution License (CDDL) v1.0
+jboss--jnet--3.2.1=GNU LESSER GENERAL PUBLIC LICENSE
+org.apache.commons--commons-email--1.2=Apache License, Version 2.0
+org.apache.zookeeper--zookeeper--3.3.1=The Apache Software License, Version 2.0
+org.jdom--jdom--1.1=Apache License
+oro--oro--2.0.8=The Apache Software License, Version 2.0
+rome--rome--1.0=Apache Software License - Version 2.0
+xpp3--xpp3_min--1.1.3.4.O=Indiana University Extreme\! Lab Software License
Added: trunk/vradi-web/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/vradi-web/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/vradi-web/src/license/THIRD-PARTY.properties 2011-08-18 06:56:45 UTC (rev 131)
@@ -0,0 +1,62 @@
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License
+# - Apache Software License, Version 1.1
+# - Apache Software License, Version 2.0
+# - Apache Software License, version 1.1
+# - BSD License
+# - BSD style
+# - BSD-style license
+# - CDDL
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+# - Common Public License Version 1.0
+# - GNU Affero General Public License version 3
+# - GNU Lesser General Public License, Version 3
+# - GPLv2+CE
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - JDom license
+# - JDom license (Apache-like)
+# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - MIT License
+# - MPL 1.1
+# - Mozilla Public License
+# - Mozilla Public License Version 1.0
+# - Mozilla Public License version 1.1
+# - Public Domain
+# - Public domain
+# - TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
+# - The Apache Software License, Version 1.1
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - http://asm.ow2.org/license.html
+# - http://source.icu-project.org/repos/icu/icu/trunk/license.html
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Thu Aug 18 08:50:50 CEST 2011
+antlr--antlr--2.7.2=BSD License
+asm--asm--3.1=http\://asm.ow2.org/license.html
+asm--asm-commons--3.1=http\://asm.ow2.org/license.html
+asm--asm-tree--3.1=http\://asm.ow2.org/license.html
+com.ibm.icu--icu4j--2.6.1=http\://source.icu-project.org/repos/icu/icu/trunk/license.html
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+concurrent--concurrent--1.0=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC.
+dom4j--dom4j--1.6.1=BSD License
+groovy--groovy-all--1.0-jsr-06=Apache Software License, Version 2.0
+jakarta-regexp--jakarta-regexp--1.4=The Apache Software License, Version 2.0
+javax.servlet--jsp-api--2.0=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+javax.servlet--servlet-api--2.5=Common Development and Distribution License (CDDL) v1.0
+javax.transaction--jta--1.1=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+jaxen--jaxen--1.1.1=The Apache Software License, Version 2.0
+jboss--jnet--3.2.1=GNU Lesser General Public License, Version 3
+jdom--jdom--1.0=JDom license (Apache-like)
+org.apache.zookeeper--zookeeper--3.3.1=The Apache Software License, Version 2.0
+org.jdom--jdom--1.1=JDom license
+oro--oro--2.0.8=The Apache Software License, Version 2.0
+rome--rome--1.0=Apache Software License, Version 2.0
+xerces--xercesImpl--2.6.2=The Apache Software License, Version 2.0
+xpp3--xpp3_min--1.1.3.4.O=Indiana University Extreme\! Lab Software License, vesion 1.1.1
Property changes on: trunk/vradi-web/src/license/THIRD-PARTY.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
1
0
r130 - in trunk: vradi-services/src/main/java/org/chorem/vradi/services vradi-services/src/main/java/org/chorem/vradi/services/managers vradi-services-web/src/test/java/org/chorem/vradi/services
by tchemit@users.chorem.org 18 Aug '11
by tchemit@users.chorem.org 18 Aug '11
18 Aug '11
Author: tchemit
Date: 2011-08-18 08:30:43 +0200 (Thu, 18 Aug 2011)
New Revision: 130
Url: http://chorem.org/repositories/revision/vradi/130
Log:
fix savage api change :(
Modified:
trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java
trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java
trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/FormTypeManager.java
Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java
===================================================================
--- trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java 2011-08-16 23:14:01 UTC (rev 129)
+++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/VradiDataServiceImpl.java 2011-08-18 06:30:43 UTC (rev 130)
@@ -65,6 +65,7 @@
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
@@ -381,7 +382,7 @@
public WikittyExtension updateFormType(String name, Map<String, FieldType> fields,
String requires, Map<String, String> tagValues) throws VradiException {
- return formTypeManager.updateFormType(name, fields, requires, tagValues);
+ return formTypeManager.updateFormType(name, fields, Arrays.asList(requires), tagValues);
}
/**
Modified: trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/FormTypeManager.java
===================================================================
--- trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/FormTypeManager.java 2011-08-16 23:14:01 UTC (rev 129)
+++ trunk/vradi-services/src/main/java/org/chorem/vradi/services/managers/FormTypeManager.java 2011-08-18 06:30:43 UTC (rev 130)
@@ -133,9 +133,12 @@
* @param requires the new requires of the form type
* @param tagValues the new tag values of the form type
* @return the form type up to date
+ * @throws VradiException
*/
- public WikittyExtension updateFormType(String name, Map<String, FieldType> fields,
- String requires, Map<String, String> tagValues) throws VradiException {
+ public WikittyExtension updateFormType(String name,
+ Map<String, FieldType> fields,
+ List<String> requires,
+ Map<String, String> tagValues) throws VradiException {
if (log.isDebugEnabled()) {
log.debug("updateFormType(" + name + ", fields, requires, tagValues)");
Modified: trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java
===================================================================
--- trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java 2011-08-16 23:14:01 UTC (rev 129)
+++ trunk/vradi-services-web/src/test/java/org/chorem/vradi/services/VradiHessianStorageTest.java 2011-08-18 06:30:43 UTC (rev 130)
@@ -157,7 +157,7 @@
session.setNum(7);
wikittyProxy.getWikitty(session).addExtension(
- new WikittyExtension("ouaf", "2.0", null,
+ new WikittyExtension("ouaf", "2.0", (String)null,
WikittyUtil.buildFieldMapExtension(
"Numeric a",
"Numeric b",
1
0
Author: tchemit
Date: 2011-08-17 01:14:01 +0200 (Wed, 17 Aug 2011)
New Revision: 129
Url: http://chorem.org/repositories/revision/vradi/129
Log:
Update mavenpom4redmine to 3.0.1.
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-08-04 09:53:00 UTC (rev 128)
+++ trunk/pom.xml 2011-08-16 23:14:01 UTC (rev 129)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.0</version>
+ <version>3.0.1</version>
</parent>
<groupId>org.chorem</groupId>
1
0