Faxtomail-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
May 2014
- 3 participants
- 78 discussions
r74 - in trunk/faxtomail-ui-swing/src/main: java/com/franciaflex/faxtomail/ui/swing/content/demande java/com/franciaflex/faxtomail/ui/swing/content/demande/history resources/i18n
by kmorin@users.forge.codelutin.com 14 May '14
by kmorin@users.forge.codelutin.com 14 May '14
14 May '14
Author: kmorin
Date: 2014-05-14 19:23:11 +0200 (Wed, 14 May 2014)
New Revision: 74
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/74
Log:
send history by email
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-14 14:34:29 UTC (rev 73)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-14 17:23:11 UTC (rev 74)
@@ -871,7 +871,12 @@
@Override
public String getTitle() {
- return getObject();
+ String result = getObject();
+ String ref = getReference();
+ if (!ref.isEmpty()) {
+ result = ref + " - " + result;
+ }
+ return result;
}
@Override
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java 2014-05-14 14:34:29 UTC (rev 73)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/history/HistoryListUIHandler.java 2014-05-14 17:23:11 UTC (rev 74)
@@ -28,6 +28,9 @@
import com.franciaflex.faxtomail.persistence.entities.History;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupHandler;
+import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil;
+import jaxx.runtime.JAXXUtil;
+import jaxx.runtime.SwingUtil;
import jaxx.runtime.swing.model.JaxxDefaultListModel;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.collections.CollectionUtils;
@@ -40,6 +43,7 @@
import javax.swing.*;
import java.awt.*;
+import java.awt.event.ActionEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.*;
@@ -75,6 +79,8 @@
n("faxtomail.demande.rangeRow.label");
}
+ protected Action sendAction;
+
@Override
public void beforeInit(HistoryListUI ui) {
super.beforeInit(ui);
@@ -101,6 +107,41 @@
((JaxxDefaultListModel) getUI().getHistories().getModel()).setAllElements(history);
}
});
+
+ sendAction = new AbstractAction() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+// AbstractToolbarPopupHandler.this.ui.dispose();
+// AbstractToolbarPopupHandler.this.ui.setVisible(false);
+ StringBuilder historyAsString = new StringBuilder();
+ Collection<History> histories = getModel().getHistory();
+ for (History history : histories) {
+ historyAsString.append(t("faxtomail.common.on.label") + " " + decorate(history.getModificationDate()))
+ .append(" : " + JAXXUtil.getStringValue(history.getType().getLabel()));
+ String decoratedFields = decorateFields(history.getFields());
+ if (!decoratedFields.isEmpty()) {
+ historyAsString.append(" (" + decoratedFields + ")");
+ }
+ historyAsString.append("\n");
+ }
+ FaxToMailUIUtil.mail(t("faxtomail.demande.history.send.subject", getModel().getTitle()), historyAsString.toString());
+ }
+ };
+
+ ImageIcon actionIcon = SwingUtil.createActionIcon("reply");
+ sendAction.putValue(Action.SMALL_ICON, actionIcon);
+ sendAction.putValue(Action.LARGE_ICON_KEY, actionIcon);
+ sendAction.putValue(Action.NAME, "send");
+ sendAction.putValue(Action.SHORT_DESCRIPTION, t("faxtomail.demande.history.action.send.tip"));
+ JButton sendButton = new JButton(sendAction);
+ sendButton.setText(null);
+ sendButton.setFocusPainted(false);
+ sendButton.setRequestFocusEnabled(false);
+ sendButton.setFocusable(false);
+
+ ui.getBody().getRightDecoration().add(sendButton, 0);
}
@Override
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-14 14:34:29 UTC (rev 73)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-14 17:23:11 UTC (rev 74)
@@ -88,6 +88,8 @@
faxtomail.demande.gamme.label=Gamme
faxtomail.demande.group.button.label=Grouper
faxtomail.demande.group.successful=Groupement réussi avec l'élément %s
+faxtomail.demande.history.action.send.tip=
+faxtomail.demande.history.send.subject=Historique de %s
faxtomail.demande.lastAttachmentOpening.label=Dernière ouverture de pièce-jointe
faxtomail.demande.lastModified.label=Dernière modification
faxtomail.demande.localReference.label=Référence
1
0
r73 - in trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing: content/demande util
by kmorin@users.forge.codelutin.com 14 May '14
by kmorin@users.forge.codelutin.com 14 May '14
14 May '14
Author: kmorin
Date: 2014-05-14 16:34:29 +0200 (Wed, 14 May 2014)
New Revision: 73
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/73
Log:
les lignes en orange sont les mails dont la pi?\195?\168ce jointe a ?\195?\169t?\195?\169 consult?\195?\169 sans ?\195?\170tre prise. Il faut que l'ordre dans l'historique soit: changement de dossier, pi?\195?\168ce jointe ouverte, et non pris
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-05-14 13:43:25 UTC (rev 72)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-05-14 14:34:29 UTC (rev 73)
@@ -244,7 +244,7 @@
}
#lastAttachmentOpeningPanel {
- visible: { model.getLastAttachmentOpeningUser() != null };
+ visible: { model.getLastAttachmentOpeningInThisFolderUser() != null };
}
#lastAttachmentOpeningLabel {
@@ -256,7 +256,7 @@
}
#lastAttachmentOpenedByField {
- text: { handler.decorateUser(model.getLastAttachmentOpeningUser(), true) };
+ text: { handler.decorateUser(model.getLastAttachmentOpeningInThisFolderUser(), true) };
}
#lastAttachmentOpeningDateLabel {
@@ -264,7 +264,7 @@
}
#lastAttachmentOpeningDateField {
- text: { handler.decorate(model.getLastAttachmentOpeningDate()) };
+ text: { handler.decorate(model.getLastAttachmentOpeningInThisFolderDate()) };
}
#leftVerticalSplitPanel {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-14 13:43:25 UTC (rev 72)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-14 14:34:29 UTC (rev 73)
@@ -87,7 +87,7 @@
public static final String PROPERTY_CLIENT_BRAND = "clientBrand";
public static final String PROPERTY_REFERENCE = "reference";
public static final String PROPERTY_EDITABLE = "editable";
- public static final String PROPERTY_LAST_ATTACHMENT_OPENING_USER = "lastAttachmentOpeningUser";
+ public static final String PROPERTY_LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER = "lastAttachmentOpeningInThisFolderUser";
public static final String PROPERTY_GROUPED_DEMANDES = "groupedDemandes";
protected final Email editObject = new EmailImpl();
@@ -100,7 +100,7 @@
protected History lastModificationHistory;
- protected History lastAttachmentOpeningHistory;
+ protected History lastAttachmentOpeningInThisFolderHistory;
protected int quotationNb;
@@ -140,7 +140,7 @@
public void propertyChange(PropertyChangeEvent evt) {
findFirstOpeningHistory();
findLastModificationHistory();
- findLastAttachmentOpeningHistory();
+ findLastAttachmentOpeningInThisFolderHistory();
}
});
@@ -474,21 +474,35 @@
lastModificationHistory = result;
}
- public void findLastAttachmentOpeningHistory() {
+ public void findLastAttachmentOpeningInThisFolderHistory() {
History result = null;
- Date date = null;
Collection<History> histories = getHistory();
+
if (histories != null) {
+ History transmissionHistory = null;
for (History history : histories) {
+ Date modificationDate = history.getModificationDate();
if (HistoryType.ATTACHMENT_OPENING.equals(history.getType())) {
- if (date == null || date.before(history.getModificationDate())) {
- date = history.getModificationDate();
+ if ((transmissionHistory == null
+ || transmissionHistory.getModificationDate().before(modificationDate))
+ && (result == null
+ || result.getModificationDate().before(modificationDate))) {
result = history;
}
+
+ } else if (HistoryType.TRANSMISSION.equals(history.getType())) {
+ if (transmissionHistory == null
+ || transmissionHistory.getModificationDate().before(modificationDate)) {
+
+ transmissionHistory = history;
+ if (result != null && result.getModificationDate().before(transmissionHistory.getModificationDate())) {
+ result = null;
+ }
+ }
}
}
}
- lastAttachmentOpeningHistory = result;
+ lastAttachmentOpeningInThisFolderHistory = result;
}
public History getFirstOpeningHistory() {
@@ -519,17 +533,17 @@
return history != null ? history.getModificationDate() : null;
}
- public History getLastAttachmentOpeningHistory() {
- return lastAttachmentOpeningHistory;
+ public History getLastAttachmentOpeningInThisFolderHistory() {
+ return lastAttachmentOpeningInThisFolderHistory;
}
- public FaxToMailUser getLastAttachmentOpeningUser() {
- History history = getLastAttachmentOpeningHistory();
+ public FaxToMailUser getLastAttachmentOpeningInThisFolderUser() {
+ History history = getLastAttachmentOpeningInThisFolderHistory();
return history != null ? history.getFaxToMailUser() : null;
}
- public Date getLastAttachmentOpeningDate() {
- History history = getLastAttachmentOpeningHistory();
+ public Date getLastAttachmentOpeningInThisFolderDate() {
+ History history = getLastAttachmentOpeningInThisFolderHistory();
return history != null ? history.getModificationDate() : null;
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-05-14 13:43:25 UTC (rev 72)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-05-14 14:34:29 UTC (rev 73)
@@ -105,7 +105,7 @@
DemandeUIModel.PROPERTY_PF_NB,
DemandeUIModel.PROPERTY_SAV_NB,
Email.PROPERTY_TAKEN_BY,
- DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER,
+ DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER,
Email.PROPERTY_REPLIES,
Email.PROPERTY_ATTACHMENT
}, ',');
@@ -165,7 +165,7 @@
break;
case Email.PROPERTY_TAKEN_BY:
- case DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER:
+ case DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER:
tableCellRenderer = newTableCellRender(FaxToMailUser.class);
break;
@@ -205,7 +205,7 @@
if (highlight) {
Font font = renderer.getFont();
renderer.setFont(font.deriveFont(Font.ITALIC));
- renderer.setForeground(new Color(96, 96, 96));
+ renderer.setForeground(adapter.isSelected() ? Color.WHITE : new Color(96, 96, 96));
}
return renderer;
}
@@ -243,8 +243,8 @@
int viewRow = adapter.row;
int modelRow = adapter.convertRowIndexToModel(viewRow);
DemandeUIModel row = tableModel.getEntry(modelRow);
- return row.getLastAttachmentOpeningUser() != null
- && !row.getLastAttachmentOpeningUser().equals(row.getTakenBy());
+ return row.getLastAttachmentOpeningInThisFolderUser() != null
+ && !row.getLastAttachmentOpeningInThisFolderUser().equals(row.getTakenBy());
}
};
color = Color.ORANGE;
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-05-14 13:43:25 UTC (rev 72)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-05-14 14:34:29 UTC (rev 73)
@@ -48,11 +48,13 @@
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
+import javax.swing.text.JTextComponent;
import java.awt.*;
import java.awt.List;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
@@ -137,6 +139,14 @@
ApplicationDataUtil.setProperty(getModel(), property, value);
}
+ @Override
+ public void setText(KeyEvent event, String property) {
+ JTextComponent field = (JTextComponent) event.getSource();
+ if (field.isEditable()) {
+ super.setText(event, property);
+ }
+ }
+
//------------------------------------------------------------------------//
//-- Internal methods --//
//------------------------------------------------------------------------//
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-05-14 13:43:25 UTC (rev 72)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-05-14 14:34:29 UTC (rev 73)
@@ -161,9 +161,9 @@
n("faxtomail.demandeList.table.header.attachment"),
n("faxtomail.demandeList.table.header.attachment.tip")));
- put(DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER,
+ put(DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER,
ColumnIdentifier.<Email>newId(
- DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER,
+ DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_IN_THIS_FOLDER_USER,
n("faxtomail.demandeList.table.header.lastAttachmentOpeningUser"),
n("faxtomail.demandeList.table.header.lastAttachmentOpeningUser.tip")));
1
0
r72 - in trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing: actions content/attachment content/demande content/demande/replies content/reply
by kmorin@users.forge.codelutin.com 14 May '14
by kmorin@users.forge.codelutin.com 14 May '14
14 May '14
Author: kmorin
Date: 2014-05-14 15:43:25 +0200 (Wed, 14 May 2014)
New Revision: 72
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/72
Log:
- fix row color not updated when the user opens an attachment from the demand list
- fix range panel shown if no type defined
- fix transmission
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellEditor.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentEditorUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/ButtonAttachment.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -27,6 +27,7 @@
import com.franciaflex.faxtomail.persistence.entities.DemandStatus;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUI;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
+import com.franciaflex.faxtomail.ui.swing.content.demande.DemandesUI;
import com.franciaflex.faxtomail.ui.swing.content.transmit.MailFolderChooserUI;
import com.franciaflex.faxtomail.ui.swing.content.transmit.MailFolderChooserUIHandler;
import jaxx.runtime.JAXXContext;
@@ -49,8 +50,9 @@
model.setTakenBy(null);
//TODO kmorin 20140306
- DemandeUI parentUI = (DemandeUI) getUI().getContextValue(JAXXContext.class, JAXXUtil.PARENT);
- SaveDemandeAction action = getContext().getActionFactory().createLogicAction(parentUI.getHandler(),
+ DemandesUI parentUI = (DemandesUI) getUI().getContextValue(JAXXContext.class, JAXXUtil.PARENT);
+ DemandeUI demandeUI = (DemandeUI) parentUI.getDemandsTabPane().getSelectedComponent();
+ SaveDemandeAction action = getContext().getActionFactory().createLogicAction(demandeUI.getHandler(),
SaveDemandeAndExitAction.class);
getContext().getActionEngine().runAction(action);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellEditor.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellEditor.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellEditor.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -25,6 +25,7 @@
*/
import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.persistence.entities.HistoryType;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
@@ -107,22 +108,24 @@
public void onAttachmentOpened(Attachment attachment) {
String topiaId = model.getTopiaId();
if (topiaId != null) {
- context.getEmailService().addToHistory(topiaId,
- HistoryType.ATTACHMENT_OPENING,
- context.getCurrentUser(),
- new Date(),
- attachment.getOriginalFile().getName());
+ Email email = context.getEmailService().addToHistory(topiaId,
+ HistoryType.ATTACHMENT_OPENING,
+ context.getCurrentUser(),
+ new Date(),
+ attachment.getOriginalFile().getName());
+ model.fromEntity(email);
}
}
@Override
public void onAttachmentEdited(Attachment attachment) {
String topiaId = model.getTopiaId();
- context.getEmailService().addToHistory(topiaId,
- HistoryType.ATTACHMENT_MODIFICATION,
- context.getCurrentUser(),
- new Date(),
- attachment.getOriginalFile().getName());
+ Email email = context.getEmailService().addToHistory(topiaId,
+ HistoryType.ATTACHMENT_MODIFICATION,
+ context.getCurrentUser(),
+ new Date(),
+ attachment.getOriginalFile().getName());
+ model.fromEntity(email);
}
};
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentEditorUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentEditorUIHandler.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentEditorUIHandler.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -26,6 +26,7 @@
import com.franciaflex.faxtomail.persistence.entities.Attachment;
import com.franciaflex.faxtomail.persistence.entities.AttachmentImpl;
+import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.ui.swing.content.MainUI;
import com.franciaflex.faxtomail.ui.swing.content.pdfeditor.PDFEditorUI;
import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupHandler;
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/ButtonAttachment.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/ButtonAttachment.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/ButtonAttachment.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -25,7 +25,9 @@
*/
import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
+import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupButton;
import org.apache.commons.collections4.CollectionUtils;
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-05-14 13:43:25 UTC (rev 72)
@@ -268,11 +268,11 @@
}
#leftVerticalSplitPanel {
- dividerSize : { Boolean.TRUE.equals(model.getDemandType().getRangeNeeded()) ? 10 : 0 };
+ dividerSize : { model.isRangePanelVisible() ? 10 : 0 };
}
#rangePanel {
- visible: { Boolean.TRUE.equals(model.getDemandType().getRangeNeeded()) };
+ visible: { model.isRangePanelVisible() };
}
#ediCodeNumberLabel {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -42,9 +42,7 @@
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
-import jaxx.runtime.swing.JAXXWidgetUtil;
import org.apache.commons.io.Charsets;
-import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
@@ -53,7 +51,6 @@
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
-import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.mail.Address;
import javax.mail.BodyPart;
@@ -66,8 +63,6 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileOutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
@@ -87,6 +82,7 @@
public static final String PROPERTY_QUOTATION_NB = "quotationNb";
public static final String PROPERTY_PF_NB = "pfNb";
public static final String PROPERTY_SAV_NB = "savNb";
+ public static final String PROPERTY_RANGE_PANEL_VISIBLE = "rangePanelVisible";
public static final String PROPERTY_CLIENT_CODE = "clientCode";
public static final String PROPERTY_CLIENT_BRAND = "clientBrand";
public static final String PROPERTY_REFERENCE = "reference";
@@ -344,10 +340,17 @@
public void setDemandType(DemandType demandType) {
Object oldValue = getDemandType();
+ Object rangePanelVisibleOldValue = isRangePanelVisible();
editObject.setDemandType(demandType);
firePropertyChanged(Email.PROPERTY_DEMAND_TYPE, oldValue, demandType);
+ firePropertyChanged(DemandeUIModel.PROPERTY_RANGE_PANEL_VISIBLE, rangePanelVisibleOldValue, isRangePanelVisible());
}
+ public boolean isRangePanelVisible() {
+ DemandType demandType = getDemandType();
+ return demandType != null && Boolean.TRUE.equals(demandType.getRangeNeeded());
+ }
+
public DemandStatus getDemandStatus() {
return editObject.getDemandStatus();
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -28,7 +28,6 @@
import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.persistence.entities.Reply;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
-import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentModelAware;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.content.demande.demandgroup.DemandGroupUI;
import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupButton;
@@ -49,8 +48,6 @@
*/
public class ButtonDemandReplies extends AbstractToolbarPopupButton<DemandRepliesUI> {
-// protected DemandeUIModel currentDemand;
-
protected String textKey;
private PropertyChangeListener listener = new PropertyChangeListener() {
@@ -58,17 +55,6 @@
public void propertyChange(PropertyChangeEvent evt) {
Collection<Reply> replies = (Collection<Reply>) evt.getNewValue();
setText(getButtonText(replies));
-//
-// if (currentDemand != null) {
-// List<Reply> oldValue = (List<Reply>) evt.getOldValue();
-// Collection<Reply> toAdd = CollectionUtils.subtract(replies, oldValue);
-// currentDemand.addAllReplies(toAdd);
-//
-// Collection<Reply> toRemove = CollectionUtils.subtract(oldValue, replies);
-// for (Reply reply : toRemove) {
-// currentDemand.removeReply(reply);
-// }
-// }
}
};
@@ -83,8 +69,8 @@
}
public String getButtonText(Collection<Reply> replies) {
- int attachmentNb = CollectionUtils.size(replies);
- return t(textKey, attachmentNb);
+ int replyNb = CollectionUtils.size(replies);
+ return t(textKey, replyNb);
}
public void init(DemandeUIModel model) {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -99,7 +99,8 @@
for (DemandeUIModel demandeUIModel : models) {
for (Attachment attachment : demandeUIModel.getAttachment()) {
- model.addAvailableAttachment(attachment.getOriginalFile());
+ final File originalFile = attachment.getOriginalFile();
+ model.addAvailableAttachment(originalFile);
File file = attachment.getEditedFile();
if (file != null) {
model.addAvailableAttachment(file);
@@ -107,6 +108,10 @@
}
}
+ JComboBox addAttachmentFile = ui.getAddAttachmentFile();
+ addAttachmentFile.setModel(newComboModel(model.getAvailableAttachments().toArray()));
+ addAttachmentFile.setSelectedItem(null);
+
model.setFrom(demand.getRecipient());
model.setSubject(t("faxtomail.reply.subject", demand.getSubject()));
@@ -151,8 +156,6 @@
JComboBox addAttachmentFile = ui.getAddAttachmentFile();
addAttachmentFile.setRenderer(new DecoratorListCellRenderer(getDecorator(File.class, null)));
addAttachmentFile.setEditor(new FileComboBoxEditor());
- addAttachmentFile.setModel(newComboModel(model.getAvailableAttachments().toArray()));
- addAttachmentFile.setSelectedItem(null);
}
@Override
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java 2014-05-13 17:18:45 UTC (rev 71)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIModel.java 2014-05-14 13:43:25 UTC (rev 72)
@@ -24,17 +24,12 @@
* #L%
*/
-import com.franciaflex.faxtomail.persistence.entities.Attachment;
-import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentModelAware;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import org.apache.commons.io.FileUtils;
import org.jdesktop.beans.AbstractSerializableBean;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
/**
1
0
r71 - in trunk/faxtomail-ui-swing/src/main: java/com/franciaflex/faxtomail/ui/swing/content/demande java/com/franciaflex/faxtomail/ui/swing/util resources/i18n
by kmorin@users.forge.codelutin.com 13 May '14
by kmorin@users.forge.codelutin.com 13 May '14
13 May '14
Author: kmorin
Date: 2014-05-13 19:18:45 +0200 (Tue, 13 May 2014)
New Revision: 71
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/71
Log:
- ajout d'une colonne qui combine notre r?\195?\169f?\195?\169rence et les num?\195?\169ros de commande
- A la cr?\195?\169ation manuelle d'une fiche, il faut pouvoir choisir le statut.
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-05-13 17:18:45 UTC (rev 71)
@@ -28,6 +28,7 @@
import com.ezware.oxbow.swingbits.table.filter.JTableFilter;
import com.ezware.oxbow.swingbits.table.filter.TableRowFilterSupport;
import com.franciaflex.faxtomail.persistence.entities.Company;
+import com.franciaflex.faxtomail.persistence.entities.DemandStatus;
import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.persistence.entities.History;
@@ -396,6 +397,7 @@
email.setReceptionDate(now);
email.setTakenBy(currentUser);
email.setHistory(histories);
+ email.setDemandStatus(DemandStatus.UNTREATED);
openDemand(email);
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-05-13 17:18:45 UTC (rev 71)
@@ -112,8 +112,15 @@
#statusField {
text: { model.getDemandStatus().getLabel() };
+ visible: { model.getTopiaId() != null };
}
+#statusComboBox {
+ property: demandStatus;
+ selectedItem: { model.getDemandStatus() };
+ visible: { model.getTopiaId() == null };
+}
+
#etatAttenteLabel {
text: "faxtomail.demande.etatAttente.label";
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-05-13 17:18:45 UTC (rev 71)
@@ -185,7 +185,13 @@
<JLabel id='statusLabel'/>
</cell>
<cell weightx='1' columns="3">
- <JLabel id='statusField'/>
+ <JPanel layout="{new BorderLayout()}">
+ <JLabel id='statusField' constraints='BorderLayout.NORTH'/>
+ <BeanFilterableComboBox id='statusComboBox'
+ constructorParams='this'
+ genericType="DemandStatus"
+ constraints='BorderLayout.SOUTH'/>
+ </JPanel>
</cell>
</row>
<row>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-05-13 17:18:45 UTC (rev 71)
@@ -24,6 +24,7 @@
import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.DemandStatus;
import com.franciaflex.faxtomail.persistence.entities.DemandType;
import com.franciaflex.faxtomail.persistence.entities.Email;
import com.franciaflex.faxtomail.persistence.entities.EtatAttente;
@@ -75,6 +76,7 @@
import java.beans.PropertyChangeListener;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@@ -145,6 +147,7 @@
initBeanFilterableComboBox(ui.getDocTypeComboBox(), referentielService.getAllDemandType(), model.getDemandType());
initBeanFilterableComboBox(ui.getPriorityComboBox(), referentielService.getAllPriority(), model.getPriority());
+ initBeanFilterableComboBox(ui.getStatusComboBox(), Arrays.asList(DemandStatus.values()), model.getDemandStatus());
List<EtatAttente> etatAttentes = new ArrayList<EtatAttente>();
Collection<EtatAttente> folderEtatAttentes = getEtatAttenteForFolder(folder);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-13 17:18:45 UTC (rev 71)
@@ -39,6 +39,9 @@
import com.franciaflex.faxtomail.persistence.entities.Reply;
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailBeanUIModel;
import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentModelAware;
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Collections2;
import jaxx.runtime.swing.JAXXWidgetUtil;
import org.apache.commons.io.Charsets;
import org.apache.commons.io.FileUtils;
@@ -84,10 +87,9 @@
public static final String PROPERTY_QUOTATION_NB = "quotationNb";
public static final String PROPERTY_PF_NB = "pfNb";
public static final String PROPERTY_SAV_NB = "savNb";
- public static final String PROPERTY_PLAIN_CONTENT = "plainContent";
- public static final String PROPERTY_HTML_CONTENT = "htmlContent";
public static final String PROPERTY_CLIENT_CODE = "clientCode";
public static final String PROPERTY_CLIENT_BRAND = "clientBrand";
+ public static final String PROPERTY_REFERENCE = "reference";
public static final String PROPERTY_EDITABLE = "editable";
public static final String PROPERTY_LAST_ATTACHMENT_OPENING_USER = "lastAttachmentOpeningUser";
public static final String PROPERTY_GROUPED_DEMANDES = "groupedDemandes";
@@ -388,14 +390,40 @@
public void setCompanyReference(String companyReference) {
Object oldValue = getCompanyReference();
+ Object refOldValue = getReference();
editObject.setCompanyReference(companyReference);
firePropertyChanged(Email.PROPERTY_COMPANY_REFERENCE, oldValue, companyReference);
+ firePropertyChanged(PROPERTY_REFERENCE, refOldValue, getReference());
}
public String getCompanyReference() {
return editObject.getCompanyReference();
}
+ public String getReference() {
+ List<String> reference = new ArrayList<String>();
+ if (StringUtils.isNotBlank(getCompanyReference())) {
+ reference.add(getCompanyReference());
+ }
+ Collection<RangeRow> rangeRow = getRangeRow();
+ if (rangeRow != null) {
+ Collection<String> commandNumbers = Collections2.transform(rangeRow, new Function<RangeRow, String>() {
+ @Override
+ public String apply(RangeRow input) {
+ return input.getCommandNumber();
+ }
+ });
+ Collections2.filter(commandNumbers, new Predicate<String>() {
+ @Override
+ public boolean apply(String input) {
+ return StringUtils.isNotBlank(input);
+ }
+ });
+ reference.addAll(commandNumbers);
+ }
+ return StringUtils.join(reference, ", ");
+ }
+
public void setHistory(Collection<History> history) {
editObject.setHistory(history);
firePropertyChanged(Email.PROPERTY_HISTORY, null, history);
@@ -546,8 +574,10 @@
if (getRangeRow() != null) {
oldValue = new ArrayList<RangeRow>(getRangeRow());
}
+ String refOldValue = getReference();
editObject.addRangeRow(rangeRow);
firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
+ firePropertyChanged(PROPERTY_REFERENCE, refOldValue, getReference());
}
public void addAllRangeRow(Collection<RangeRow> rangeRow) {
@@ -555,8 +585,10 @@
if (getRangeRow() != null) {
oldValue = new ArrayList<RangeRow>(getRangeRow());
}
+ String refOldValue = getReference();
editObject.addAllRangeRow(rangeRow);
firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
+ firePropertyChanged(PROPERTY_REFERENCE, refOldValue, getReference());
}
public void removeRangeRow(RangeRow rangeRow) {
@@ -564,8 +596,10 @@
if (getRangeRow() != null) {
oldValue = new ArrayList<RangeRow>(getRangeRow());
}
+ String refOldValue = getReference();
editObject.removeRangeRow(rangeRow);
firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
+ firePropertyChanged(PROPERTY_REFERENCE, refOldValue, getReference());
}
public void setRangeRow(Collection<RangeRow> rangeRow) {
@@ -576,8 +610,10 @@
if (rangeRow == null) {
rangeRow = new ArrayList<RangeRow>();
}
+ String refOldValue = getReference();
editObject.setRangeRow(rangeRow);
firePropertyChange(Email.PROPERTY_RANGE_ROW, oldValue, getRangeRow());
+ firePropertyChanged(PROPERTY_REFERENCE, refOldValue, getReference());
}
public MailFolder getMailFolder() {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-05-13 17:18:45 UTC (rev 71)
@@ -97,6 +97,7 @@
Email.PROPERTY_SENDER,
Email.PROPERTY_PROJECT_REFERENCE,
Email.PROPERTY_COMPANY_REFERENCE,
+ DemandeUIModel.PROPERTY_REFERENCE,
Email.PROPERTY_RECEPTION_DATE,
Email.PROPERTY_RECIPIENT,
Email.PROPERTY_DEMAND_STATUS,
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-05-13 17:18:45 UTC (rev 71)
@@ -131,6 +131,12 @@
n("faxtomail.demandeList.table.header.companyReference"),
n("faxtomail.demandeList.table.header.companyReference.tip")));
+ put(DemandeUIModel.PROPERTY_REFERENCE,
+ ColumnIdentifier.<Email>newReadOnlyId(
+ DemandeUIModel.PROPERTY_REFERENCE,
+ n("faxtomail.demandeList.table.header.reference"),
+ n("faxtomail.demandeList.table.header.reference.tip")));
+
put(DemandeUIModel.PROPERTY_PF_NB,
ColumnIdentifier.<Email>newReadOnlyId(
DemandeUIModel.PROPERTY_PF_NB,
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-13 10:10:24 UTC (rev 70)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-13 17:18:45 UTC (rev 71)
@@ -153,6 +153,8 @@
faxtomail.demandeList.table.header.receptionDate.tip=Date de réception
faxtomail.demandeList.table.header.recipient=Destinataire
faxtomail.demandeList.table.header.recipient.tip=Addresse email ou numéro de fax du destinataire
+faxtomail.demandeList.table.header.reference=Référence
+faxtomail.demandeList.table.header.reference.tip=Référence (notre référence + numéros de commande)
faxtomail.demandeList.table.header.replies=Réponses
faxtomail.demandeList.table.header.replies.tip=Réponses envoyées
faxtomail.demandeList.table.header.savNb=Qté SAV
1
0
r70 - in trunk: faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search faxtomail-ui-swing/src/main/resources/i18n
by kmorin@users.forge.codelutin.com 13 May '14
by kmorin@users.forge.codelutin.com 13 May '14
13 May '14
Author: kmorin
Date: 2014-05-13 12:10:24 +0200 (Tue, 13 May 2014)
New Revision: 70
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/70
Log:
add reply date and user in search form
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-05-13 10:10:24 UTC (rev 70)
@@ -58,6 +58,7 @@
public static final String PROPERTY_PRINTING_BY = "printingBy";
public static final String PROPERTY_ARCHIVED_BY = "archivedBy";
public static final String PROPERTY_TRANSFER_BY = "transferBy";
+ public static final String PROPERTY_REPLY_BY = "replyBy";
public static final String PROPERTY_MIN_MODIFICATION_DATE = "minModificationDate";
public static final String PROPERTY_MAX_MODIFICATION_DATE = "maxModificationDate";
public static final String PROPERTY_MIN_RECEPTION_DATE = "minReceptionDate";
@@ -68,6 +69,8 @@
public static final String PROPERTY_MAX_ARCHIVED_DATE = "maxArchivedDate";
public static final String PROPERTY_MIN_TRANSFER_DATE = "minTransferDate";
public static final String PROPERTY_MAX_TRANSFER_DATE = "maxTransferDate";
+ public static final String PROPERTY_MIN_REPLY_DATE = "minReplyDate";
+ public static final String PROPERTY_MAX_REPLY_DATE = "maxReplyDate";
public static final String PROPERTY_CLIENT_CODE = "clientCode";
protected String sender;
@@ -108,6 +111,8 @@
protected FaxToMailUser archivedBy;
+ protected FaxToMailUser replyBy;
+
protected Date minModificationDate;
protected Date maxModificationDate;
@@ -128,6 +133,10 @@
protected Date maxArchivedDate;
+ protected Date minReplyDate;
+
+ protected Date maxReplyDate;
+
protected String clientCode;
public String getSender() {
@@ -385,6 +394,16 @@
firePropertyChange(PROPERTY_ARCHIVED_BY, oldValue, archivedBy);
}
+ public FaxToMailUser getReplyBy() {
+ return replyBy;
+ }
+
+ public void setReplyBy(FaxToMailUser replyBy) {
+ FaxToMailUser oldValue = this.replyBy;
+ this.replyBy = replyBy;
+ firePropertyChange(PROPERTY_REPLY_BY, oldValue, replyBy);
+ }
+
public Date getMinTransferDate() {
return minTransferDate;
}
@@ -424,4 +443,24 @@
this.maxArchivedDate = maxArchivedDate;
firePropertyChange(PROPERTY_MAX_ARCHIVED_DATE, oldValue, maxArchivedDate);
}
+
+ public Date getMinReplyDate() {
+ return minReplyDate;
+ }
+
+ public void setMinReplyDate(Date minReplyDate) {
+ Date oldValue = this.minReplyDate;
+ this.minReplyDate = minReplyDate;
+ firePropertyChange(PROPERTY_MIN_REPLY_DATE, oldValue, minReplyDate);
+ }
+
+ public Date getMaxReplyDate() {
+ return maxReplyDate;
+ }
+
+ public void setMaxReplyDate(Date maxReplyDate) {
+ Date oldValue = this.maxReplyDate;
+ this.maxReplyDate = maxReplyDate;
+ firePropertyChange(PROPERTY_MAX_REPLY_DATE, oldValue, maxReplyDate);
+ }
}
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-05-13 10:10:24 UTC (rev 70)
@@ -191,6 +191,38 @@
query.append(")");
}
+ // email minReplyDate
+ if (emailFilter.getMinReplyDate() != null || emailFilter.getReplyBy() != null) {
+ query.append(" AND EXISTS (FROM " + History.class.getName() + " H WHERE H in elements(E." + Email.PROPERTY_HISTORY + ")");
+ query.append(" AND H." + History.PROPERTY_TYPE + " = :replyType");
+ args.put("replyType", HistoryType.REPLY);
+ if (emailFilter.getMinReplyDate() != null) {
+ query.append(" AND H." + History.PROPERTY_MODIFICATION_DATE + " >= :" + EmailFilter.PROPERTY_MIN_REPLY_DATE);
+ args.put(EmailFilter.PROPERTY_MIN_REPLY_DATE, emailFilter.getMinReplyDate());
+ }
+ if (emailFilter.getReplyBy() != null) {
+ query.append(" AND H." + History.PROPERTY_FAX_TO_MAIL_USER + " = :" + EmailFilter.PROPERTY_REPLY_BY);
+ args.put(EmailFilter.PROPERTY_REPLY_BY, emailFilter.getReplyBy());
+ }
+ query.append(")");
+ }
+
+ // email maxReplyDate
+ if (emailFilter.getMaxReplyDate() != null || emailFilter.getReplyBy() != null) {
+ query.append(" AND EXISTS (FROM " + History.class.getName() + " H WHERE H in elements(E." + Email.PROPERTY_HISTORY + ")");
+ query.append(" AND H." + History.PROPERTY_TYPE + " = :replyType");
+ args.put("replyType", HistoryType.REPLY);
+ if (emailFilter.getMaxReplyDate() != null) {
+ query.append(" AND H." + History.PROPERTY_MODIFICATION_DATE + " <= :" + EmailFilter.PROPERTY_MAX_REPLY_DATE);
+ args.put(EmailFilter.PROPERTY_MAX_REPLY_DATE, emailFilter.getMaxReplyDate());
+ }
+ if (emailFilter.getReplyBy() != null) {
+ query.append(" AND H." + History.PROPERTY_FAX_TO_MAIL_USER + " = :" + EmailFilter.PROPERTY_REPLY_BY);
+ args.put(EmailFilter.PROPERTY_REPLY_BY, emailFilter.getReplyBy());
+ }
+ query.append(")");
+ }
+
// email sender
if (StringUtils.isNotBlank(emailFilter.getSender())) {
query.append(" AND lower(E." + Email.PROPERTY_SENDER + ") LIKE lower(:" + EmailFilter.PROPERTY_SENDER + ")");
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-05-13 10:10:24 UTC (rev 70)
@@ -144,6 +144,27 @@
selectedItem: { model.getPrintingBy() };
}
+#repliedBetweenLabel {
+ text: "faxtomail.search.repliedBetween.label";
+}
+
+#repliedBetweenStartDatePicker {
+ date: { model.getMinReplyDate() };
+}
+
+#repliedBetweenEndDatePicker {
+ date: { model.getMaxReplyDate() };
+}
+
+#repliedByLabel {
+ text: "faxtomail.demande.repliedBy.label";
+}
+
+#repliedByComboBox {
+ property: replyBy;
+ selectedItem: { model.getReplyBy() };
+}
+
#objectLabel {
text: "faxtomail.demande.object.label";
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-05-13 10:10:24 UTC (rev 70)
@@ -193,7 +193,33 @@
</row>
<row>
+ <cell anchor='west'>
+ <JLabel id='repliedBetweenLabel'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenStartDatePicker'
+ onActionPerformed="model.setMinReplyDate(repliedBetweenStartDatePicker.getDate())"/>
+ </cell>
<cell>
+ <JLabel styleClass='between2ndPartLabel'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenEndDatePicker'
+ onActionPerformed="model.setMaxReplyDate(repliedBetweenEndDatePicker.getDate())"/>
+ </cell>
+
+ <cell anchor='west'>
+ <JLabel id='repliedByLabel'/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='repliedByComboBox'
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
<JLabel id='senderLabel'/>
</cell>
<cell columns='3' weightx="1">
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-05-13 10:10:24 UTC (rev 70)
@@ -127,6 +127,10 @@
initBeanFilterableComboBox(ui.getPrintedByComboBox(),
getContext().getUserService().getAllUsers(),
model.getPrintingBy());
+ initBeanFilterableComboBox(ui.getRepliedByComboBox(),
+ getContext().getUserService().getAllUsers(),
+ model.getReplyBy());
+
initCheckBoxComboBox(ui.getDocTypeComboBox(),
referentielService.getAllDemandType(),
model.getDemandType(),
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-05-13 10:10:24 UTC (rev 70)
@@ -149,6 +149,27 @@
selectedItem: { model.getPrintingBy() };
}
+#repliedBetweenLabel {
+ text: "faxtomail.search.repliedBetween.label";
+}
+
+#repliedBetweenStartDatePicker {
+ date: { model.getMinReplyDate() };
+}
+
+#repliedBetweenEndDatePicker {
+ date: { model.getMaxReplyDate() };
+}
+
+#repliedByLabel {
+ text: "faxtomail.demande.repliedBy.label";
+}
+
+#repliedByComboBox {
+ property: replyBy;
+ selectedItem: { model.getReplyBy() };
+}
+
#objectLabel {
text: "faxtomail.demande.object.label";
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-05-13 10:10:24 UTC (rev 70)
@@ -204,7 +204,33 @@
</row>
<row>
+ <cell anchor='west'>
+ <JLabel id='repliedBetweenLabel'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenStartDatePicker'
+ onActionPerformed="model.setMinReplyDate(repliedBetweenStartDatePicker.getDate())"/>
+ </cell>
<cell>
+ <JLabel styleClass='between2ndPartLabel'/>
+ </cell>
+ <cell weightx='1'>
+ <JXDatePicker id='repliedBetweenEndDatePicker'
+ onActionPerformed="model.setMaxReplyDate(repliedBetweenEndDatePicker.getDate())"/>
+ </cell>
+
+ <cell anchor='west'>
+ <JLabel id='repliedByLabel'/>
+ </cell>
+ <cell columns='3' weightx='2'>
+ <BeanFilterableComboBox id='repliedByComboBox'
+ constructorParams='this'
+ genericType="FaxToMailUser"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell>
<JLabel id='senderLabel'/>
</cell>
<cell columns='3' weightx="1">
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-05-13 10:10:24 UTC (rev 70)
@@ -127,6 +127,9 @@
initBeanFilterableComboBox(ui.getPrintedByComboBox(),
getContext().getUserService().getAllUsers(),
model.getPrintingBy());
+ initBeanFilterableComboBox(ui.getRepliedByComboBox(),
+ getContext().getUserService().getAllUsers(),
+ model.getReplyBy());
initCheckBoxComboBox(ui.getDocTypeComboBox(),
referentielService.getAllDemandType(),
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-05-13 10:10:24 UTC (rev 70)
@@ -181,6 +181,16 @@
firePropertyChanged(EmailFilter.PROPERTY_ARCHIVED_BY, oldValue, faxToMailUser);
}
+ public FaxToMailUser getReplyBy() {
+ return editObject.getReplyBy();
+ }
+
+ public void setReplyBy(FaxToMailUser faxToMailUser) {
+ Object oldValue = getReplyBy();
+ editObject.setReplyBy(faxToMailUser);
+ firePropertyChanged(EmailFilter.PROPERTY_REPLY_BY, oldValue, faxToMailUser);
+ }
+
public List<Priority> getPriority() {
return editObject.getPriority();
}
@@ -338,6 +348,26 @@
editObject.setMaxArchivedDate(maxArchivedDate);
firePropertyChanged(EmailFilter.PROPERTY_MAX_ARCHIVED_DATE, oldValue, maxArchivedDate);
}
+
+ public Date getMinReplyDate() {
+ return editObject.getMinReplyDate();
+ }
+
+ public void setMinReplyDate(Date minReplyDate) {
+ Object oldValue = getMinReplyDate();
+ editObject.setMinReplyDate(minReplyDate);
+ firePropertyChanged(EmailFilter.PROPERTY_MIN_REPLY_DATE, oldValue, minReplyDate);
+ }
+
+ public Date getMaxReplyDate() {
+ return editObject.getMaxReplyDate();
+ }
+
+ public void setMaxReplyDate(Date maxReplyDate) {
+ Object oldValue = getMaxReplyDate();
+ editObject.setMaxReplyDate(maxReplyDate);
+ firePropertyChanged(EmailFilter.PROPERTY_MAX_REPLY_DATE, oldValue, maxReplyDate);
+ }
public Date getMinTransferDate() {
return editObject.getMinTransferDate();
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-13 08:40:15 UTC (rev 69)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-13 10:10:24 UTC (rev 70)
@@ -102,6 +102,7 @@
faxtomail.demande.receivedDate.label=Reçu le
faxtomail.demande.receptionDate.label=Date de réception
faxtomail.demande.recipient.label=Destinataire
+faxtomail.demande.repliedBy.label=Réponse par
faxtomail.demande.reply.button.label=Répondre
faxtomail.demande.save.button.label=Enregistrer
faxtomail.demande.sender.label=Émetteur
@@ -233,6 +234,7 @@
faxtomail.search.modifiedBy.label=Modifié par
faxtomail.search.printedBetween.label=Imprimé entre le
faxtomail.search.receivedBetween.label=Reçu entre le
+faxtomail.search.repliedBetween.label=Réponse entre le
faxtomail.search.resultNb=Nombre de résultats \: %s
faxtomail.search.title=Recherche
faxtomail.search.transferBetween.label=Transmit entre le
1
0
Author: echatellier
Date: 2014-05-13 10:40:15 +0200 (Tue, 13 May 2014)
New Revision: 69
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/69
Log:
Remove duplicated dep
Modified:
trunk/faxtomail-persistence/pom.xml
Modified: trunk/faxtomail-persistence/pom.xml
===================================================================
--- trunk/faxtomail-persistence/pom.xml 2014-05-12 20:23:24 UTC (rev 68)
+++ trunk/faxtomail-persistence/pom.xml 2014-05-13 08:40:15 UTC (rev 69)
@@ -104,11 +104,6 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-collections4</artifactId>
- </dependency>
<dependency>
<groupId>commons-logging</groupId>
1
0
Build failed in Jenkins: faxtomail-nightly » FaxToMail :: Persistence #23
by admin+ci-codelutin.com@codelutin.com 12 May '14
by admin+ci-codelutin.com@codelutin.com 12 May '14
12 May '14
See <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
Changes:
[kmorin] refs #4659 [ECRAN] Recherche
possibilité de rechercher plusieurs états attente, ou aucun (idem pour statut, gamme, type de demande)
[echatellier] fixes #4657: [TECH] Intégration EDI
------------------------------------------
[...truncated 91 lines...]
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] Scan 161 files header done in 132.931ms.
[INFO]
* uptodate header on 15 files.
* add header on 146 files.
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ faxtomail-persistence ---
[INFO] Compiling 137 source files to <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.10:check (default) @ faxtomail-persistence ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
[INFO]
[INFO] --- jredmine-maven-plugin:1.8.1:generate-changes (jredmine-generate-changes) @ faxtomail-persistence ---
[INFO] Skipping goal (skipGenerateChanges flag is on).
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ faxtomail-persistence ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ faxtomail-persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ faxtomail-persistence ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ faxtomail-persistence ---
[INFO] No tests to run.
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ faxtomail-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ faxtomail-persistence >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ faxtomail-persistence ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ faxtomail-persistence ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ faxtomail-persistence ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[INFO]
[INFO] --- eugene-maven-plugin:2.8:generate (generate-entities) @ faxtomail-persistence ---
[INFO] Process phase [zargo] for one entry.
[INFO] Expanding 1 xmi file(s) from <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] Copy file <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…> to <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] No file generated.
[INFO] Process phase [xmi] for one entry.
[INFO] Processing XSL tranformation on <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…> for 1 file(s).
[INFO] No file generated.
[INFO] Process phase [model] for one entry.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:126) beforeReadFile - No properties provider filled, will instanciate a new default one
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:294) loadModelTagValue - Invalid model tag value [model.tagValue.java.lang.String] : the tagvalue 'java.lang.String' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:303) loadModelTagValue - Invalid model tag value [model.tagValue.useEnumerationName] : this tagvalue 'useEnumerationName' can not be apply on the model.
INFO [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:270) loadModelProperties - 5 tag values were succesfull imported from <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO] No file generated.
[INFO] Apply generator JavaInterfaceTransformer
[INFO] Apply generator TopiaMetaTransformer
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [com.franciaflex.faxtomail.persistence.entities.AbstractFaxToMailTopiaDao], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [com.franciaflex.faxtomail.persistence.entities.EmailTopiaDao], already found in class-path.
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ faxtomail-persistence <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ faxtomail-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ faxtomail-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/faxtomail-nightly/com.franciaflex.faxto…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ faxtomail-persistence ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ faxtomail-persistence ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ faxtomail-persistence ---
[INFO] Loaded /var/local/forge/data/codelutin.com/jenkins/workspace/faxtomail-nightly/trunk/target/collect-artifacts.txt
[INFO] Copying faxtomail-persistence-0.1-SNAPSHOT.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/faxtomail-nightly/trunk/target/collect/com.franciaflex.faxtomail--faxtomail-persistence/faxtomail-persistence-0.1-SNAPSHOT.jar
[INFO] Copying THIRD-PARTY.properties to /var/local/forge/data/codelutin.com/jenkins/workspace/faxtomail-nightly/trunk/target/collect/com.franciaflex.faxtomail--faxtomail-persistence/THIRD-PARTY.properties
[INFO] Copying faxtomail-persistence-0.1-SNAPSHOT-sources.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/faxtomail-nightly/trunk/target/collect/com.franciaflex.faxtomail--faxtomail-persistence/faxtomail-persistence-0.1-SNAPSHOT-sources.jar
[INFO] Copying faxtomail-persistence-0.1-SNAPSHOT-javadoc.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/faxtomail-nightly/trunk/target/collect/com.franciaflex.faxtomail--faxtomail-persistence/faxtomail-persistence-0.1-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ faxtomail-persistence ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ faxtomail-persistence ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ faxtomail-persistence ---
[INFO] Used declared dependencies found:
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-beta-3:compile
[INFO] org.hibernate:hibernate-core:jar:4.3.5.Final:compile
[INFO] org.nuiton:nuiton-utils:jar:3.0-SNAPSHOT:compile
[INFO] org.nuiton:nuiton-config:jar:3.0-alpha-2:compile
[INFO] org.nuiton:nuiton-updater:jar:3.0-alpha-2:compile
[INFO] org.nuiton.jaxx:jaxx-application-api:jar:2.8.5-SNAPSHOT:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:3.0:compile
[INFO] com.google.guava:guava:jar:16.0.1:compile
[INFO] org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] commons-io:commons-io:jar:2.4:compile
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] org.swinglabs.swingx:swingx-common:jar:1.6.5-1:compile
[WARNING] Used undeclared dependencies found:
[WARNING] org.apache.commons:commons-collections4:jar:4.0:compile
[JENKINS] Archiving disabled
1
4
12 May '14
Author: kmorin
Date: 2014-05-12 22:23:24 +0200 (Mon, 12 May 2014)
New Revision: 68
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/68
Log:
- add column to display the replies
- merge the search fields reference and command number
Added:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -41,7 +41,7 @@
public static final String PROPERTY_SENDER = "sender";
//public static final String PROPERTY_RECIPIENT = "recipient";
- public static final String PROPERTY_SUBJECT = "subject";
+ public static final String PROPERTY_DEMAND_OBJECT = "demandObject";
public static final String PROPERTY_MESSAGE = "message";
public static final String PROPERTY_BODY = "body";
public static final String PROPERTY_ETAT_ATTENTE = "etatAttente";
@@ -53,7 +53,7 @@
public static final String PROPERTY_EDI_CODE_NUMBER = "ediCodeNumber";
public static final String PROPERTY_PROJECT_REFERENCE = "projectReference";
public static final String PROPERTY_LOCAL_REFERENCE = "localReference";
- public static final String PROPERTY_COMMAND_NUMBER = "commandNumber";
+// public static final String PROPERTY_COMMAND_NUMBER = "commandNumber";
public static final String PROPERTY_MODIFIED_BY = "modifiedBy";
public static final String PROPERTY_PRINTING_BY = "printingBy";
public static final String PROPERTY_ARCHIVED_BY = "archivedBy";
@@ -74,7 +74,7 @@
//protected String recipient;
- protected String subject;
+ protected String demandObject;
protected String message;
@@ -92,7 +92,7 @@
protected String ediCodeNumber;
- protected String commandNumber;
+// protected String commandNumber;
protected String projectReference;
@@ -150,14 +150,14 @@
firePropertyChange(PROPERTY_RECIPIENT, oldValue, recipient);
}*/
- public String getSubject() {
- return subject;
+ public String getDemandObject() {
+ return demandObject;
}
- public void setSubject(String subject) {
- String oldValue = this.subject;
- this.subject = subject;
- firePropertyChange(PROPERTY_SUBJECT, oldValue, subject);
+ public void setDemandObject(String demandObject) {
+ String oldValue = this.demandObject;
+ this.demandObject = demandObject;
+ firePropertyChange(PROPERTY_DEMAND_OBJECT, oldValue, demandObject);
}
public List<EtatAttente> getEtatAttente() {
@@ -335,16 +335,16 @@
firePropertyChange(PROPERTY_GAMME, null, gamme);
}
- public String getCommandNumber() {
- return commandNumber;
- }
+// public String getCommandNumber() {
+// return commandNumber;
+// }
+//
+// public void setCommandNumber(String commandNumber) {
+// String oldValue = this.commandNumber;
+// this.commandNumber = commandNumber;
+// firePropertyChange(PROPERTY_COMMAND_NUMBER, oldValue, commandNumber);
+// }
- public void setCommandNumber(String commandNumber) {
- String oldValue = this.commandNumber;
- this.commandNumber = commandNumber;
- firePropertyChange(PROPERTY_COMMAND_NUMBER, oldValue, commandNumber);
- }
-
public String getLocalReference() {
return localReference;
}
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -204,9 +204,9 @@
}
// email subject
- if (StringUtils.isNotBlank(emailFilter.getSubject())) {
- query.append(" AND lower(E." + Email.PROPERTY_OBJECT + ") LIKE lower(:" + EmailFilter.PROPERTY_SUBJECT + ")");
- args.put(EmailFilter.PROPERTY_SUBJECT, "%" + emailFilter.getSubject() + "%");
+ if (StringUtils.isNotBlank(emailFilter.getDemandObject())) {
+ query.append(" AND lower(E." + Email.PROPERTY_OBJECT + ") LIKE lower(:" + EmailFilter.PROPERTY_DEMAND_OBJECT + ")");
+ args.put(EmailFilter.PROPERTY_DEMAND_OBJECT, "%" + emailFilter.getDemandObject() + "%");
}
// email demand type
@@ -233,12 +233,6 @@
args.put(EmailFilter.PROPERTY_PROJECT_REFERENCE, "%" + emailFilter.getProjectReference() + "%");
}
- // email localReference
- if (StringUtils.isNotBlank(emailFilter.getLocalReference())) {
- query.append(" AND lower(E." + Email.PROPERTY_COMPANY_REFERENCE + ") LIKE lower(:" + EmailFilter.PROPERTY_LOCAL_REFERENCE + ")");
- args.put(EmailFilter.PROPERTY_LOCAL_REFERENCE, "%" + emailFilter.getLocalReference() + "%");
- }
-
// email priority
List<Priority> priority = emailFilter.getPriority();
if (CollectionUtils.isNotEmpty(priority)) {
@@ -306,11 +300,12 @@
// args.put(EmailFilter.PROPERTY_BODY, "%" + emailFilter.getBody() + "%");
// }
- // email commandNumber
- if (StringUtils.isNotBlank(emailFilter.getCommandNumber())) {
- query.append(" AND EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
- query.append(" AND lower(RR." + RangeRow.PROPERTY_COMMAND_NUMBER + ") LIKE lower(:" + EmailFilter.PROPERTY_COMMAND_NUMBER + ")");
- args.put(EmailFilter.PROPERTY_COMMAND_NUMBER, "%" + emailFilter.getCommandNumber() + "%");
+ // email localReference
+ if (StringUtils.isNotBlank(emailFilter.getLocalReference())) {
+ query.append(" AND (EXISTS (FROM " + RangeRow.class.getName() + " RR WHERE RR in elements(E." + Email.PROPERTY_RANGE_ROW + ")");
+ query.append(" AND lower(RR." + RangeRow.PROPERTY_COMMAND_NUMBER + ") LIKE lower(:" + EmailFilter.PROPERTY_LOCAL_REFERENCE + "))");
+ query.append(" OR lower(E." + Email.PROPERTY_COMPANY_REFERENCE + ") LIKE lower(:" + EmailFilter.PROPERTY_LOCAL_REFERENCE + ")");
+ args.put(EmailFilter.PROPERTY_LOCAL_REFERENCE, "%" + emailFilter.getLocalReference() + "%");
query.append(")");
}
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/DecoratorService.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -125,6 +125,7 @@
});
registerMultiJXPathDecorator(HasLabel.class, "${label}$s", SEPARATOR, " - ");
registerMultiJXPathDecorator(Attachment.class, "${originalFile}$s", SEPARATOR, " - ");
+ registerMultiJXPathDecorator(Reply.class, "${sentDate}$s#${subject}$s", SEPARATOR, " - ");
registerMultiJXPathDecorator(FaxToMailUser.class, "${trigraph}$s#${firstName}$s#${lastName}$s", SEPARATOR, " ");
}
};
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -247,19 +247,20 @@
// companies
CompanyTopiaDao companyTopiaDao = getPersistenceContext().getCompanyDao();
ConfigurationTopiaDao configurationTopiaDao = getPersistenceContext().getConfigurationDao();
- Configuration configuration = configurationTopiaDao.create(Configuration.PROPERTY_TABLE_COLUMNS,
- Email.PROPERTY_PRIORITY + "," +
- Email.PROPERTY_DEMAND_TYPE + "," +
- Email.PROPERTY_OBJECT + "," +
- "clientCode," +
- Email.PROPERTY_SENDER + "," +
- Email.PROPERTY_RECEPTION_DATE + "," +
- Email.PROPERTY_DEMAND_STATUS + "," +
- "pfNb,savNb," +
- Email.PROPERTY_TAKEN_BY + "," +
- "lastAttachmentOpeningUser," +
- Email.PROPERTY_ATTACHMENT
- );
+// Configuration configuration = configurationTopiaDao.create(Configuration.PROPERTY_TABLE_COLUMNS,
+// Email.PROPERTY_PRIORITY + "," +
+// Email.PROPERTY_DEMAND_TYPE + "," +
+// Email.PROPERTY_OBJECT + "," +
+// "clientCode," +
+// Email.PROPERTY_SENDER + "," +
+// Email.PROPERTY_RECEPTION_DATE + "," +
+// Email.PROPERTY_DEMAND_STATUS + "," +
+// "pfNb,savNb," +
+// Email.PROPERTY_TAKEN_BY + "," +
+// "lastAttachmentOpeningUser," +
+// Email.PROPERTY_ATTACHMENT
+// );
+ Configuration configuration = configurationTopiaDao.create();
Company fx = companyTopiaDao.create(Company.PROPERTY_NAME, "Franciaflex",
Company.PROPERTY_CONFIGURATION, configuration,
Company.PROPERTY_MAIL_FOLDER, folders.values());
Modified: trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java
===================================================================
--- trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -76,7 +76,7 @@
Assert.assertEquals(18, emails.size());
// client code filter + subject filter
- filter.setSubject("ARENO");
+ filter.setDemandObject("ARENO");
emails = service.search(filter);
Assert.assertEquals(2, emails.size());
@@ -102,7 +102,7 @@
filter.setDemandStatus(Collections.singletonList(DemandStatus.ARCHIVED));
filter.setGamme(Collections.singletonList(referentielService.getAllRange().get(0)));
filter.setPriority(referentielService.getAllPriority());
- filter.setCommandNumber("test");
+// filter.setCommandNumber("test");
filter.setEtatAttente(Collections.singletonList(referentielService.getAllEtatAttente().get(0)));
filter.setEdiCodeNumber("test");
filter.setLocalReference("test");
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/SearchAction.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -53,11 +53,16 @@
List<Email> emails = getContext().getEmailService().search(emailFilter);
List<DemandeUIModel> result = new ArrayList<>();
- for (Email mail : emails) {
+ for (Email email : emails) {
DemandeUIModel demand = new DemandeUIModel();
- demand.fromEntity(mail);
+ demand.fromEntity(email);
demand.setValid(handler.isDemandeValid(demand));
result.add(demand);
+
+ if (model.isShowGroupesDemandsInResults()) {
+ demand.setGroupedDemandes(email.getEmailGroup());
+ result.addAll(demand.getGroupedDemandes());
+ }
}
model.setResults(result);
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -275,7 +275,7 @@
@Override
protected String[] getEditableTableProperties() {
- return new String[] { Email.PROPERTY_PRIORITY, Email.PROPERTY_ATTACHMENT };
+ return new String[] { Email.PROPERTY_PRIORITY, Email.PROPERTY_ATTACHMENT, Email.PROPERTY_REPLIES };
}
@Override
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-05-12 20:23:24 UTC (rev 68)
@@ -74,7 +74,8 @@
</BeanValidator>
<JToolBar id='topToolBar'>
- <ButtonDemandReplies id="demandRepliesButton"/>
+ <ButtonDemandReplies id="demandRepliesButton"
+ constructorParams="model"/>
<ButtonHistory id="historyButton"/>
<ButtonAttachment id="attachmentsButton"
constructorParams="model"/>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -683,6 +683,12 @@
return groupedDemandes.size();
}
+ public void addAllReplies(Collection<Reply> replies) {
+ Object oldValue = new ArrayList<Reply>(getReplies());
+ editObject.addAllReplies(replies);
+ firePropertyChange(Email.PROPERTY_REPLIES, oldValue, getAttachment());
+ }
+
public void addReplies(Reply reply) {
Object oldValue = null;
if (getReplies() != null) {
@@ -692,6 +698,12 @@
firePropertyChange(Email.PROPERTY_REPLIES, null, getReplies());
}
+ public void removeReply(Reply reply) {
+ Object oldValue = new ArrayList<Reply>(getReplies());
+ editObject.removeReplies(reply);
+ firePropertyChange(Email.PROPERTY_REPLIES, oldValue, getReplies());
+ }
+
public void setReplies(Collection<Reply> replies) {
Object oldValue = null;
if (getReplies() != null) {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUI.css 2014-05-12 20:23:24 UTC (rev 68)
@@ -48,7 +48,6 @@
#printButton {
text: "faxtomail.demande.print.button.label";
actionIcon: print;
- enabled: { model.getCurrentDemand().isValid() && model.getCurrentDemand().isEditable() };
}
#archiveButton {
@@ -59,11 +58,11 @@
#replyButton {
text: "faxtomail.demande.reply.button.label";
actionIcon: reply;
- enabled: { model.getCurrentDemand().isEditable() };
+ enabled: { model.getCurrentDemand().isEditable() || model.getCurrentDemand().getArchiveDate() != null };
}
#groupButton {
text: "faxtomail.demande.group.button.label";
actionIcon: group;
- enabled: { model.getCurrentDemand().isEditable() };
+ enabled: { model.getCurrentDemand().isEditable() || model.getCurrentDemand().getArchiveDate() != null };
}
\ No newline at end of file
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -38,6 +38,9 @@
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler;
import com.franciaflex.faxtomail.ui.swing.util.CloseableUI;
import jaxx.runtime.validator.swing.SwingValidator;
+import org.nuiton.jaxx.application.swing.AbstractApplicationUIHandler;
+import org.nuiton.jaxx.application.swing.ApplicationUI;
+import org.nuiton.jaxx.application.swing.tab.CustomTab;
import org.nuiton.jaxx.application.swing.tab.DelegateTabContainerHandler;
import org.nuiton.jaxx.application.swing.tab.TabContainerHandler;
import org.nuiton.jaxx.application.swing.tab.TabContentModel;
@@ -149,19 +152,33 @@
*/
@Override
public TabHandler getTabHandler(int index) {
- TabHandler tabHandler = delegateTabHandler.getTabHandler(index);
+ TabHandler tabHandler = null;
+ JTabbedPane tabPanel = getTabPanel();
+ if (index >= 0 && index < tabPanel.getTabCount()) {
+ Component tab = tabPanel.getComponentAt(index);
+ if (ApplicationUI.class.isInstance(tab)) {
+ ApplicationUI tuttiTab = (ApplicationUI) tabPanel.getComponentAt(index);
+ AbstractApplicationUIHandler handler = tuttiTab.getHandler();
+ if (TabHandler.class.isInstance(handler)) {
+ tabHandler = (TabHandler) handler;
+ }
+ }
+ }
return tabHandler;
}
@Override
public void setCustomTab(int index, TabContentModel model) {
- delegateTabHandler.setCustomTab(index, model);
+ JTabbedPane tabPanel = getTabPanel();
+ tabPanel.setTabComponentAt(index, new CustomTab(model, this));
}
@Override
public boolean removeTab(int i) {
- boolean remove = delegateTabHandler.removeTab(i);
+ TabHandler tabHandler = getTabHandler(i);
+ boolean remove = tabHandler.onRemoveTab();
if (remove) {
+ getTabPanel().removeTabAt(i);
getModel().removeDemand(i);
}
return remove;
@@ -170,10 +187,7 @@
@Override
protected void initUI(DemandesUI ui) {
super.initUI(ui);
-
- JTabbedPane tabPanel = getTabPanel();
- delegateTabHandler = new DelegateTabContainerHandler(tabPanel, this);
- delegateTabHandler.init();
+ init();
}
@Override
@@ -183,12 +197,37 @@
@Override
public void init() {
- delegateTabHandler.init();
+ getTabPanel().setModel(new DefaultSingleSelectionModel() {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void setSelectedIndex(int index) {
+ int currentIndex = getTabPanel().getSelectedIndex();
+ boolean mustChangeTab = onTabChanged(currentIndex, index);
+
+ if (mustChangeTab) {
+ super.setSelectedIndex(index);
+ }
+ }
+
+ });
}
@Override
public boolean onTabChanged(int currentIndex, int newIndex) {
- boolean change = delegateTabHandler.onTabChanged(currentIndex, newIndex);
+ boolean change = true;
+ if (currentIndex != newIndex) {
+ TabHandler handler = getTabHandler(currentIndex);
+ if (handler != null) {
+ change = handler.onHideTab(currentIndex, newIndex);
+ }
+
+ handler = getTabHandler(newIndex);
+ if (handler != null) {
+ handler.onShowTab(currentIndex, newIndex);
+ }
+ }
if (change) {
getModel().setCurrentIndex(newIndex);
}
@@ -265,13 +304,16 @@
ReplyFormUI dialogContent = new ReplyFormUI(ui);
ReplyFormUIModel model = dialogContent.getModel();
+ DemandeUIModel currentDemand = getModel().getCurrentDemand();
+ model.setOriginalDemand(currentDemand);
+
+ model.setTo(currentDemand.getSender());
DemandeUI demandeUI = (DemandeUI) getTabPanel().getSelectedComponent();
- model.setTo(demandeUI.getModel().getSender());
SaveAndOpenDialogAction action = new SaveAndOpenDialogAction(demandeUI.getHandler(),
false,
dialogContent,
- t("faxtomail.reply.title", demandeUI.getModel().getObject()),
+ t("faxtomail.reply.title", currentDemand.getObject()),
new Dimension(800, 600));
getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -24,6 +24,9 @@
* #L%
*/
+import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
+import com.franciaflex.faxtomail.ui.swing.FaxToMailScreen;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeAction;
import com.franciaflex.faxtomail.ui.swing.content.MainUI;
@@ -37,6 +40,7 @@
import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.HighlighterFactory;
+import org.nuiton.jaxx.application.swing.AbstractApplicationUIHandler;
import javax.swing.*;
import javax.swing.event.TableModelEvent;
@@ -52,6 +56,8 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import static org.nuiton.i18n.I18n.t;
+
/**
* @author Kevin Morin (Code Lutin)
* @since x.x
@@ -149,6 +155,42 @@
demande.setCloseable(true);
// context.setCurrentEmail(demande);
// context.getActionEngine().runAction(new ShowDemandeAction(context.getMainUI().getHandler()));
+
+ FaxToMailUser takenBy = demande.getTakenBy();
+ FaxToMailUser currentUser = getContext().getCurrentUser();
+
+ //TODO kmorin 20140512 put this in an action
+ if (demande.getArchiveDate() != null) {
+ demande.setEditable(false);
+
+ } else if (takenBy != null && !currentUser.equals(takenBy)) {
+ String htmlMessage = String.format(
+ AbstractApplicationUIHandler.CONFIRMATION_FORMAT,
+ t("faxtomail.alert.alreadyTakenBy.message", decorate(takenBy)),
+ t("faxtomail.alert.alreadyTakenBy.help"));
+
+ int result = JOptionPane.showConfirmDialog(getTopestUI(),
+ htmlMessage,
+ t("faxtomail.alert.alreadyTakenBy.title"),
+ JOptionPane.YES_NO_CANCEL_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+
+ switch (result) {
+ case JOptionPane.CANCEL_OPTION:
+ return;
+
+ case JOptionPane.NO_OPTION:
+ demande.setEditable(false);
+ break;
+
+ case JOptionPane.YES_OPTION:
+ Email email = getContext().getEmailService().takeEmail(demande.getTopiaId(), currentUser);
+ demande.fromEntity(email);
+ demande.setEditable(true);
+ break;
+ }
+ }
+
MainUIHandler mainUIHandler = context.getMainUI().getHandler();
DemandesUI parentContainer = (DemandesUI) mainUIHandler.getCurrentBody();
parentContainer.getModel().addDemand(demande);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/ButtonDemandReplies.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -24,15 +24,20 @@
* #L%
*/
+import com.franciaflex.faxtomail.persistence.entities.Attachment;
import com.franciaflex.faxtomail.persistence.entities.Email;
+import com.franciaflex.faxtomail.persistence.entities.Reply;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
+import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentModelAware;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.content.demande.demandgroup.DemandGroupUI;
import com.franciaflex.faxtomail.ui.swing.util.AbstractToolbarPopupButton;
+import org.apache.commons.collections4.CollectionUtils;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.Collection;
+import java.util.List;
import static org.nuiton.i18n.I18n.t;
@@ -44,23 +49,55 @@
*/
public class ButtonDemandReplies extends AbstractToolbarPopupButton<DemandRepliesUI> {
- public ButtonDemandReplies() {
+// protected DemandeUIModel currentDemand;
+
+ protected String textKey;
+
+ private PropertyChangeListener listener = new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ Collection<Reply> replies = (Collection<Reply>) evt.getNewValue();
+ setText(getButtonText(replies));
+//
+// if (currentDemand != null) {
+// List<Reply> oldValue = (List<Reply>) evt.getOldValue();
+// Collection<Reply> toAdd = CollectionUtils.subtract(replies, oldValue);
+// currentDemand.addAllReplies(toAdd);
+//
+// Collection<Reply> toRemove = CollectionUtils.subtract(oldValue, replies);
+// for (Reply reply : toRemove) {
+// currentDemand.removeReply(reply);
+// }
+// }
+ }
+ };
+
+ public ButtonDemandReplies(DemandeUIModel model) {
+ this("faxtomail.demandReplies.text", model);
+ }
+
+ public ButtonDemandReplies(String textKey, DemandeUIModel model) {
+ this.textKey = textKey;
setToolTipText(t("faxtomail.demandReplies.action.tip"));
- int replyNb = popup.getModel().sizeReplies();
- setText(t("faxtomail.demandReplies.text", replyNb));
+ init(model);
+ }
- popup.getModel().addPropertyChangeListener(Email.PROPERTY_REPLIES, new PropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent evt) {
- Collection<String> replies = (Collection<String>) evt.getNewValue();
- if (replies != null) {
- int size = replies.size();
- setText(t("faxtomail.demandReplies.text", size));
- }
- }
- });
+ public String getButtonText(Collection<Reply> replies) {
+ int attachmentNb = CollectionUtils.size(replies);
+ return t(textKey, attachmentNb);
}
+ public void init(DemandeUIModel model) {
+ if (popup.getModel() != null) {
+ popup.getModel().removePropertyChangeListener(Email.PROPERTY_REPLIES, listener);
+ }
+ popup.setModel(model);
+ if (model != null) {
+ popup.getModel().addPropertyChangeListener(Email.PROPERTY_REPLIES, listener);
+ setText(getButtonText(model != null ? model.getReplies() : null));
+ }
+ }
+
@Override
protected String getActionIcon() {
return "reply";
@@ -71,4 +108,8 @@
return new DemandRepliesUI(FaxToMailUIContext.getApplicationContext());
}
+ public DemandeUIModel getBean() {
+ return popup.getModel();
+ }
+
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.css 2014-05-12 20:23:24 UTC (rev 68)
@@ -31,12 +31,12 @@
#noReplyLabel {
text: "faxtomail.demandReplies.empty";
- visible: { model.getReplies().isEmpty() };
+ visible: { getModel().getReplies().isEmpty() };
border: { javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3) };
font-style: italic;
}
#replies {
editable: true;
- visible: { !model.getReplies().isEmpty() };
+ visible: { !getModel().getReplies().isEmpty() };
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUI.jaxx 2014-05-12 20:23:24 UTC (rev 68)
@@ -33,7 +33,7 @@
</import>
<DemandeUIModel id='model'
- initializer='getContextValue(DemandeUIModel.class)'/>
+ javaBean='null'/>
<JXTitledPanel id='body'>
<JScrollPane id='demandRepliesBodyScrollPane'>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/DemandRepliesUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -77,35 +77,54 @@
private final static Log log = LogFactory.getLog(DemandRepliesUIHandler.class);
- @Override
- public void beforeInit(DemandRepliesUI ui) {
- super.beforeInit(ui);
+// @Override
+// public void beforeInit(DemandRepliesUI ui) {
+// super.beforeInit(ui);
+//
+// DemandeUIModel currentEmail = getContext().getCurrentEmail();
+// this.ui.setContextValue(currentEmail);
+// }
- DemandeUIModel currentEmail = getContext().getCurrentEmail();
- this.ui.setContextValue(currentEmail);
- }
-
@Override
public void afterInit(DemandRepliesUI ui) {
super.afterInit(ui);
initTable(ui.getReplies());
- getModel().addPropertyChangeListener(Email.PROPERTY_REPLIES, new PropertyChangeListener() {
+ final PropertyChangeListener listener = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
- AbstractTableModel tableModel = (AbstractTableModel) getUI().getReplies().getModel();
- tableModel.fireTableDataChanged();
+ updateTable();
}
+ };
+ getUI().addPropertyChangeListener(DemandRepliesUI.PROPERTY_MODEL, new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ DemandeUIModel oldModel = (DemandeUIModel) evt.getOldValue();
+ if (oldModel != null) {
+ oldModel.removePropertyChangeListener(Email.PROPERTY_REPLIES, listener);
+ }
+ DemandeUIModel newModel = (DemandeUIModel) evt.getNewValue();
+ if (newModel != null) {
+ newModel.addPropertyChangeListener(Email.PROPERTY_REPLIES, listener);
+ }
+ updateTable();
+ }
});
}
+ protected void updateTable() {
+ AbstractTableModel tableModel = (AbstractTableModel) getUI().getReplies().getModel();
+ tableModel.fireTableDataChanged();
+ }
+
protected void initTable(JXTable table) {
TableModel demandRepliesTableModel = new AbstractTableModel() {
@Override
public int getRowCount() {
- return getModel().sizeReplies();
+ DemandeUIModel model = getModel();
+ return model == null ? 0 : model.sizeReplies();
}
@Override
@@ -115,7 +134,8 @@
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
- return Iterables.get(getModel().getReplies(), rowIndex);
+ DemandeUIModel model = getModel();
+ return model == null ? null : Iterables.get(model.getReplies(), rowIndex);
}
@Override
Copied: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java (from rev 61, trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellEditor.java)
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java (rev 0)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellEditor.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -0,0 +1,140 @@
+package com.franciaflex.faxtomail.ui.swing.content.demande.replies;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.HistoryType;
+import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
+import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentEditorUIModel;
+import com.franciaflex.faxtomail.ui.swing.content.attachment.ButtonAttachment;
+import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
+import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailBeanUIModel;
+import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI;
+import com.google.common.base.Preconditions;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.jaxx.application.swing.table.AbstractApplicationTableModel;
+
+import javax.swing.*;
+import javax.swing.border.LineBorder;
+import javax.swing.event.CellEditorListener;
+import javax.swing.event.ChangeEvent;
+import javax.swing.table.TableCellEditor;
+import java.awt.*;
+import java.util.Date;
+import java.util.EventObject;
+
+/**
+ * To edit attachments from a table cell.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @author kmorin <morin(a)codelutin.com>
+ * @since 1.0.2
+ */
+public class RepliesCellEditor extends AbstractCellEditor implements TableCellEditor {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(RepliesCellEditor.class);
+
+ public static TableCellEditor newEditor(FaxToMailUI ui) {
+
+ return new RepliesCellEditor(FaxToMailUIContext.getApplicationContext());
+ }
+
+ protected final ButtonDemandReplies editorButton;
+
+ protected FaxToMailUIContext context;
+
+ public RepliesCellEditor(FaxToMailUIContext context) {
+ this.context = context;
+
+ this.editorButton = new ButtonDemandReplies("faxtomail.demandRepliesCellRenderer.text", null);
+ this.editorButton.setBorder(new LineBorder(Color.BLACK));
+ addCellEditorListener(new CellEditorListener() {
+ @Override
+ public void editingStopped(ChangeEvent e) {
+ editorButton.setSelected(false);
+ }
+
+ @Override
+ public void editingCanceled(ChangeEvent e) {
+ editorButton.setSelected(false);
+ }
+ });
+ }
+
+ @Override
+ public Component getTableCellEditorComponent(JTable table,
+ Object value,
+ boolean isSelected,
+ int row,
+ int column) {
+ AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel> tableModel =
+ (AbstractApplicationTableModel<AbstractFaxToMailBeanUIModel>) table.getModel();
+
+ int modelRow = table.convertRowIndexToModel(row);
+ final DemandeUIModel model = (DemandeUIModel) tableModel.getEntry(modelRow);
+ editorButton.init(model);
+
+ return editorButton;
+ }
+
+ @Override
+ public boolean shouldSelectCell(EventObject anEvent) {
+ return true;
+ }
+
+ @Override
+ public Object getCellEditorValue() {
+
+ DemandeUIModel model = editorButton.getBean();
+ Preconditions.checkNotNull(model, "No model found in editor.");
+
+ Object result = model.getReplies();
+ if (log.isDebugEnabled()) {
+ log.debug("editor value: " + result);
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean stopCellEditing() {
+ boolean b = super.stopCellEditing();
+ if (b) {
+ editorButton.init(null);
+ }
+ return b;
+ }
+
+ @Override
+ public void cancelCellEditing() {
+ editorButton.init(null);
+ super.cancelCellEditing();
+ }
+
+}
Copied: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java (from rev 61, trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/attachment/AttachmentCellRenderer.java)
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java (rev 0)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/replies/RepliesCellRenderer.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -0,0 +1,123 @@
+package com.franciaflex.faxtomail.ui.swing.content.demande.replies;
+
+/*
+ * #%L
+ * FaxToMail :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2014 Franciaflex, Code Lutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import com.franciaflex.faxtomail.persistence.entities.Attachment;
+import com.franciaflex.faxtomail.persistence.entities.Reply;
+import jaxx.runtime.SwingUtil;
+import org.apache.commons.collections.CollectionUtils;
+import org.nuiton.decorator.Decorator;
+
+import javax.swing.*;
+import javax.swing.table.DefaultTableCellRenderer;
+import java.util.List;
+
+import static org.nuiton.i18n.I18n.n;
+import static org.nuiton.i18n.I18n.t;
+
+/**
+ * Renderer of a attachement editor in a table cell.
+ *
+ * @author kmorin <morin(a)codelutin.com>
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0.2
+ */
+public class RepliesCellRenderer extends DefaultTableCellRenderer {
+
+ public static final String TEXT_PATTERN = "<html><body>%s</body></html>";
+
+ private static final long serialVersionUID = 1L;
+
+ private final String noneText;
+
+ private final Decorator<Reply> decorator;
+
+// private Font defaulfFont;
+//
+// private Font selectedFont;
+
+ public static RepliesCellRenderer newRender(Decorator<Reply> decorator) {
+ return new RepliesCellRenderer(decorator);
+ }
+
+ protected RepliesCellRenderer(Decorator<Reply> decorator) {
+ setHorizontalAlignment(CENTER);
+ setIcon(SwingUtil.createActionIcon("reply"));
+ this.noneText = n("faxtomail.demandReplies.empty");
+ this.decorator = decorator;
+ }
+
+ @Override
+ protected void setValue(Object value) {
+ // do nothing
+ }
+
+ @Override
+ public JComponent getTableCellRendererComponent(JTable table,
+ Object value,
+ boolean isSelected,
+ boolean hasFocus,
+ int row,
+ int column) {
+
+ super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
+
+ List<Reply> replies = (List<Reply>) value;
+
+ String toolTipTextValue;
+
+ if (CollectionUtils.isEmpty(replies)) {
+
+ // use HTML to show the tooltip in italic
+ toolTipTextValue = "<i>" + t(noneText) + "</i>";
+
+
+ } else {
+
+ StringBuilder sb = new StringBuilder();
+ for (Reply reply : replies) {
+ sb.append("<br/>").append(decorator.toString(reply));
+ }
+ // use html to display the tooltip on several lines
+ toolTipTextValue = sb.substring(5);
+ }
+ String textValue = t("faxtomail.demandRepliesCellRenderer.text", replies != null ? replies.size() : 0);
+ boolean editable = table.isCellEditable(row, column);
+ toolTipTextValue = String.format(TEXT_PATTERN, toolTipTextValue);
+ setEnabled(editable);
+ setText(textValue);
+ setToolTipText(toolTipTextValue);
+// setBackground(null);
+// setForeground(Color.BLACK);
+
+// if (isSelected) {
+// setFont(selectedFont);
+// } else {
+// setFont(defaulfFont);
+// }
+
+ return this;
+ }
+}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -25,27 +25,15 @@
*/
import com.franciaflex.faxtomail.persistence.entities.Attachment;
-import com.franciaflex.faxtomail.persistence.entities.Company;
-import com.franciaflex.faxtomail.persistence.entities.EtatAttente;
-import com.franciaflex.faxtomail.persistence.entities.MailFolder;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler;
import com.franciaflex.faxtomail.ui.swing.util.Cancelable;
-import com.franciaflex.faxtomail.ui.swing.util.FaxToMailUIUtil;
-import com.franciaflex.faxtomail.ui.swing.util.FolderTreeNode;
import jaxx.runtime.validator.swing.SwingValidator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.swing.*;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import java.awt.*;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Map;
+import java.io.File;
import static org.nuiton.i18n.I18n.t;
@@ -69,8 +57,15 @@
attachmentPanel.add(checkBox);
for (Attachment attachment : model.getAttachment()) {
- checkBox = new JCheckBox(attachment.getOriginalFile().getName(), true);
+ File originalFile = attachment.getOriginalFile();
+ checkBox = new JCheckBox(originalFile.getName(), true);
attachmentPanel.add(checkBox);
+
+ File file = attachment.getEditedFile();
+ if (file != null) {
+ checkBox = new JCheckBox(file.getName(), true);
+ attachmentPanel.add(checkBox);
+ }
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/reply/ReplyFormUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -73,36 +73,67 @@
super.beforeInit(ui);
ReplyFormUIModel model = new ReplyFormUIModel();
+ // TODO kmorin 20140512 make it configurable
model.setMaxAttachmentLength(10485760);
- DemandeUIModel currentEmail = getContext().getCurrentEmail();
- model.setOriginalDemand(currentEmail);
+ this.ui.setContextValue(model);
+ }
- List<DemandeUIModel> models = new ArrayList<DemandeUIModel>();
- models.add(currentEmail);
- models.addAll(currentEmail.getGroupedDemandes());
+ @Override
+ public void afterInit(ReplyFormUI replyFormUI) {
+ initUI(ui);
- for (DemandeUIModel demandeUIModel : models) {
- for (Attachment attachment : demandeUIModel.getAttachment()) {
- model.addAvailableAttachment(attachment.getOriginalFile());
- File file = attachment.getEditedFile();
- if (file != null) {
- model.addAvailableAttachment(file);
+ JEditorPane editor = ui.getMessage();
+ editor.setCaretPosition(0);
+
+ ReplyFormUIModel model = getModel();
+ model.addPropertyChangeListener(ReplyFormUIModel.PROPERTY_ORIGINAL_DEMAND, new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ DemandeUIModel demand = (DemandeUIModel) evt.getNewValue();
+ ReplyFormUIModel model = (ReplyFormUIModel) evt.getSource();
+
+ List<DemandeUIModel> models = new ArrayList<DemandeUIModel>();
+ models.add(demand);
+ models.addAll(demand.getGroupedDemandes());
+
+ for (DemandeUIModel demandeUIModel : models) {
+ for (Attachment attachment : demandeUIModel.getAttachment()) {
+ model.addAvailableAttachment(attachment.getOriginalFile());
+ File file = attachment.getEditedFile();
+ if (file != null) {
+ model.addAvailableAttachment(file);
+ }
+ }
}
- }
- }
- model.setFrom(currentEmail.getRecipient());
+ model.setFrom(demand.getRecipient());
- model.setSubject(t("faxtomail.reply.subject", currentEmail.getSubject()));
+ model.setSubject(t("faxtomail.reply.subject", demand.getSubject()));
- String plainContent = JAXXUtil.getStringValue(currentEmail.getPlainContent());
- String quotedReply = t("faxtomail.reply.message",
- decorate(currentEmail.getReceptionDate()),
- currentEmail.getSender(),
- plainContent.replaceAll("\n", "\n> "));
- model.setMessage(quotedReply);
+ String plainContent = JAXXUtil.getStringValue(demand.getPlainContent());
+ String quotedReply = t("faxtomail.reply.message",
+ decorate(demand.getReceptionDate()),
+ demand.getSender(),
+ plainContent.replaceAll("\n", "\n> "));
+ model.setMessage(quotedReply);
+ MailFolder folder = demand.getMailFolder();
+ Collection<String> folderReplyAdresses;
+ do {
+ folderReplyAdresses = folder.getReplyAdresses();
+ folder = folder.getParent();
+ } while (CollectionUtils.isEmpty(folderReplyAdresses) && folder != null);
+
+ List<String> replyToAddresses = Lists.newArrayList(demand.getRecipient());
+ if (folderReplyAdresses != null) {
+ replyToAddresses.addAll(folderReplyAdresses);
+ }
+
+ ui.getFromComboBox().setModel(newComboModel(replyToAddresses.toArray()));
+ }
+ });
+
model.addPropertyChangeListener(ReplyFormUIModel.PROPERTY_ATTACHMENT, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
@@ -117,33 +148,6 @@
}
});
- this.ui.setContextValue(model);
- }
-
- @Override
- public void afterInit(ReplyFormUI replyFormUI) {
- initUI(ui);
-
- JEditorPane editor = ui.getMessage();
- editor.setCaretPosition(0);
-
- ReplyFormUIModel model = getModel();
-
- DemandeUIModel originalDemand = model.getOriginalDemand();
- MailFolder folder = originalDemand.getMailFolder();
- Collection<String> folderReplyAdresses;
- do {
- folderReplyAdresses = folder.getReplyAdresses();
- folder = folder.getParent();
- } while (CollectionUtils.isEmpty(folderReplyAdresses) && folder != null);
-
- List<String> replyToAddresses = Lists.newArrayList(originalDemand.getRecipient());
- if (folderReplyAdresses != null) {
- replyToAddresses.addAll(folderReplyAdresses);
- }
-
- ui.getFromComboBox().setModel(newComboModel(replyToAddresses.toArray()));
-
JComboBox addAttachmentFile = ui.getAddAttachmentFile();
addAttachmentFile.setRenderer(new DecoratorListCellRenderer(getDecorator(File.class, null)));
addAttachmentFile.setEditor(new FileComboBoxEditor());
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-05-12 20:23:24 UTC (rev 68)
@@ -144,12 +144,12 @@
selectedItem: { model.getPrintingBy() };
}
-#subjectLabel {
- text: "faxtomail.demande.subject.label";
+#objectLabel {
+ text: "faxtomail.demande.object.label";
}
-#subjectField {
- text: {model.getSubject()};
+#objectField {
+ text: {model.getDemandObject()};
}
#senderLabel {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-05-12 20:23:24 UTC (rev 68)
@@ -202,21 +202,20 @@
</cell>
<cell>
- <JLabel id='clientLabel'/>
+ <JLabel id='gammeLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JTextField id='clientField'
- onKeyReleased='handler.setText(event, "clientCode")'/>
+ <JComboBox id='gammeComboBox'/>
</cell>
</row>
<row>
<cell>
- <JLabel id='subjectLabel'/>
+ <JLabel id='objectLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JTextField id='subjectField'
- onKeyReleased='handler.setText(event, "subject")'/>
+ <JTextField id='objectField'
+ onKeyReleased='handler.setText(event, "demandObject")'/>
</cell>
<cell>
@@ -239,18 +238,11 @@
<cell>
<JLabel id='projectReferenceLabel'/>
</cell>
- <cell weightx='1'>
+ <cell columns="3" weightx='1'>
<JTextField id='projectReferenceField'
onKeyReleased='handler.setText(event, "projectReference")'/>
</cell>
-
- <cell>
- <JLabel id='localReferenceLabel'/>
- </cell>
- <cell weightx='1'>
- <JTextField id='localReferenceField'
- onKeyReleased='handler.setText(event, "localReference")'/>
- </cell>
+
</row>
<row>
@@ -286,10 +278,11 @@
</cell>
<cell>
- <JLabel id='gammeLabel'/>
+ <JLabel id='clientLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JComboBox id='gammeComboBox'/>
+ <JTextField id='clientField'
+ onKeyReleased='handler.setText(event, "clientCode")'/>
</cell>
</row>
@@ -303,11 +296,11 @@
</cell>
<cell>
- <JLabel id='commandNumberLabel'/>
+ <JLabel id='localReferenceLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JTextField id='commandNumberField'
- onKeyReleased='handler.setText(event, "commandNumber")'/>
+ <JTextField id='localReferenceField'
+ onKeyReleased='handler.setText(event, "localReference")'/>
</cell>
</row>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -81,16 +81,16 @@
SearchUIModel searchUIModel = getContext().getSearch();
if (searchUIModel == null) {
searchUIModel = new SearchUIModel();
- searchUIModel.setTakenBy(getContext().getCurrentUser());
- searchUIModel.setModifiedBy(getContext().getCurrentUser());
+// searchUIModel.setTakenBy(getContext().getCurrentUser());
+// searchUIModel.setModifiedBy(getContext().getCurrentUser());
Date now = new Date();
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MONTH, -2);
Date twoMonthsAgo = cal.getTime();
- searchUIModel.setMaxModificationDate(now);
- searchUIModel.setMinModificationDate(twoMonthsAgo);
+// searchUIModel.setMaxModificationDate(now);
+// searchUIModel.setMinModificationDate(twoMonthsAgo);
searchUIModel.setMaxReceptionDate(now);
searchUIModel.setMinReceptionDate(twoMonthsAgo);
//searchUIModel.setMaxPrintingDate(now);
@@ -151,7 +151,7 @@
referentielService.getAllRange(),
model.getGamme(),
EmailFilter.PROPERTY_GAMME,
- true);
+ false);
final JXTable dataTable = getUI().getDataTable();
dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-05-12 20:23:24 UTC (rev 68)
@@ -149,12 +149,12 @@
selectedItem: { model.getPrintingBy() };
}
-#subjectLabel {
- text: "faxtomail.demande.subject.label";
+#objectLabel {
+ text: "faxtomail.demande.object.label";
}
-#subjectField {
- text: {model.getSubject()};
+#objectField {
+ text: {model.getDemandObject()};
}
#senderLabel {
@@ -273,6 +273,10 @@
}
*/
+#addGroupedElementCheckbox {
+ text: "faxtomail.search.addGroupedElement.label";
+}
+
#searchButton {
text: "faxtomail.search.button.label";
_applicationAction: { com.franciaflex.faxtomail.ui.swing.actions.SearchAction.class };
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-05-12 20:23:24 UTC (rev 68)
@@ -213,21 +213,20 @@
</cell>
<cell>
- <JLabel id='clientLabel'/>
+ <JLabel id='gammeLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JTextField id='clientField'
- onKeyReleased='handler.setText(event, "clientCode")'/>
+ <JComboBox id='gammeComboBox'/>
</cell>
</row>
<row>
<cell>
- <JLabel id='subjectLabel'/>
+ <JLabel id='objectLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JTextField id='subjectField'
- onKeyReleased='handler.setText(event, "subject")'/>
+ <JTextField id='objectField'
+ onKeyReleased='handler.setText(event, "demandObject")'/>
</cell>
<cell>
@@ -250,18 +249,11 @@
<cell>
<JLabel id='projectReferenceLabel'/>
</cell>
- <cell weightx='1'>
+ <cell columns='3' weightx='1'>
<JTextField id='projectReferenceField'
onKeyReleased='handler.setText(event, "projectReference")'/>
</cell>
-
- <cell>
- <JLabel id='localReferenceLabel'/>
- </cell>
- <cell weightx='1'>
- <JTextField id='localReferenceField'
- onKeyReleased='handler.setText(event, "localReference")'/>
- </cell>
+
</row>
<row>
@@ -297,10 +289,11 @@
</cell>
<cell>
- <JLabel id='gammeLabel'/>
+ <JLabel id='clientLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JComboBox id='gammeComboBox'/>
+ <JTextField id='clientField'
+ onKeyReleased='handler.setText(event, "clientCode")'/>
</cell>
</row>
@@ -314,14 +307,21 @@
</cell>
<cell>
- <JLabel id='commandNumberLabel'/>
+ <JLabel id='localReferenceLabel'/>
</cell>
<cell columns='3' weightx='1'>
- <JTextField id='commandNumberField'
- onKeyReleased='handler.setText(event, "commandNumber")'/>
+ <JTextField id='localReferenceField'
+ onKeyReleased='handler.setText(event, "localReference")'/>
</cell>
</row>
+ <row>
+ <cell columns="6">
+ <JCheckBox id="addGroupedElementCheckbox"
+ onItemStateChanged='handler.setBoolean(event, "showGroupesDemandsInResults")'/>
+ </cell>
+ </row>
+
</Table>
</JScrollPane>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -85,16 +85,16 @@
SearchUIModel searchUIModel = getContext().getSearch();
if (searchUIModel == null) {
searchUIModel = new SearchUIModel();
- searchUIModel.setTakenBy(getContext().getCurrentUser());
- searchUIModel.setModifiedBy(getContext().getCurrentUser());
+// searchUIModel.setTakenBy(getContext().getCurrentUser());
+// searchUIModel.setModifiedBy(getContext().getCurrentUser());
Date now = new Date();
Calendar cal = Calendar.getInstance();
cal.add(Calendar.MONTH, -2);
Date twoMonthsAgo = cal.getTime();
- searchUIModel.setMaxModificationDate(now);
- searchUIModel.setMinModificationDate(twoMonthsAgo);
+// searchUIModel.setMaxModificationDate(now);
+// searchUIModel.setMinModificationDate(twoMonthsAgo);
searchUIModel.setMaxReceptionDate(now);
searchUIModel.setMinReceptionDate(twoMonthsAgo);
//searchUIModel.setMaxPrintingDate(now);
@@ -152,7 +152,7 @@
referentielService.getAllRange(),
model.getGamme(),
EmailFilter.PROPERTY_GAMME,
- true);
+ false);
final JXTable dataTable = getUI().getDataTable();
dataTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
@@ -245,7 +245,7 @@
@Override
protected String[] getEditableTableProperties() {
- return new String[] { Email.PROPERTY_ATTACHMENT };
+ return new String[] { Email.PROPERTY_ATTACHMENT, Email.PROPERTY_REPLIES };
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -58,6 +58,7 @@
protected boolean menuEnabled;
protected boolean groupEnabled;
+ protected boolean showGroupesDemandsInResults;
protected static Binder<SearchUIModel, EmailFilter> toBeanBinder =
BinderFactory.newBinder(SearchUIModel.class,
@@ -91,14 +92,14 @@
return editObject.getRecipient();
}*/
- public void setSubject(String subject) {
- Object oldValue = getSubject();
- editObject.setSubject(subject);
- firePropertyChanged(EmailFilter.PROPERTY_SUBJECT, oldValue, subject);
+ public void setDemandObject(String demandObject) {
+ Object oldValue = getDemandObject();
+ editObject.setDemandObject(demandObject);
+ firePropertyChanged(EmailFilter.PROPERTY_DEMAND_OBJECT, oldValue, demandObject);
}
- public String getSubject() {
- return editObject.getSubject();
+ public String getDemandObject() {
+ return editObject.getDemandObject();
}
public void setClientCode(String clientCode) {
@@ -130,17 +131,17 @@
public String getBody() {
return editObject.getBody();
}
-
- public void setCommandNumber(String commandNumber) {
- Object oldValue = getCommandNumber();
- editObject.setCommandNumber(commandNumber);
- firePropertyChanged(EmailFilter.PROPERTY_COMMAND_NUMBER, oldValue, commandNumber);
- }
+//
+// public void setCommandNumber(String commandNumber) {
+// Object oldValue = getCommandNumber();
+// editObject.setCommandNumber(commandNumber);
+// firePropertyChanged(EmailFilter.PROPERTY_COMMAND_NUMBER, oldValue, commandNumber);
+// }
+//
+// public String getCommandNumber() {
+// return editObject.getCommandNumber();
+// }
- public String getCommandNumber() {
- return editObject.getCommandNumber();
- }
-
public void setEtatAttente(List<EtatAttente> etatAttente) {
editObject.setEtatAttente(etatAttente);
firePropertyChanged(EmailFilter.PROPERTY_ETAT_ATTENTE, null, etatAttente);
@@ -396,6 +397,14 @@
firePropertyChanged(PROPERTY_GROUP_ENABLED, oldValue, groupEnabled);
}
+ public boolean isShowGroupesDemandsInResults() {
+ return showGroupesDemandsInResults;
+ }
+
+ public void setShowGroupesDemandsInResults(boolean showGroupesDemandsInResults) {
+ this.showGroupesDemandsInResults = showGroupesDemandsInResults;
+ }
+
@Override
protected EmailFilter newEntity() {
return new EmailFilter();
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailDemandListHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -33,11 +33,14 @@
import com.franciaflex.faxtomail.persistence.entities.HistoryType;
import com.franciaflex.faxtomail.persistence.entities.Priority;
import com.franciaflex.faxtomail.persistence.entities.RangeRow;
+import com.franciaflex.faxtomail.persistence.entities.Reply;
import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext;
import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeAction;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentCellEditor;
import com.franciaflex.faxtomail.ui.swing.content.attachment.AttachmentCellRenderer;
+import com.franciaflex.faxtomail.ui.swing.content.demande.replies.RepliesCellEditor;
+import com.franciaflex.faxtomail.ui.swing.content.demande.replies.RepliesCellRenderer;
import com.google.common.base.Function;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
@@ -102,6 +105,7 @@
DemandeUIModel.PROPERTY_SAV_NB,
Email.PROPERTY_TAKEN_BY,
DemandeUIModel.PROPERTY_LAST_ATTACHMENT_OPENING_USER,
+ Email.PROPERTY_REPLIES,
Email.PROPERTY_ATTACHMENT
}, ',');
}
@@ -120,6 +124,12 @@
AttachmentCellRenderer.newRender(getDecorator(Attachment.class, null)),
DemandeTableModel.COLUMN_IDENTIFIERS.get(columnName)).setSortable(sortable);
+ } else if (Email.PROPERTY_REPLIES.equals(columnName)) {
+ addColumnToModel(columnModel,
+ RepliesCellEditor.newEditor(ui),
+ RepliesCellRenderer.newRender(getDecorator(Reply.class, null)),
+ DemandeTableModel.COLUMN_IDENTIFIERS.get(columnName)).setSortable(sortable);
+
} else {
TableCellRenderer tableCellRenderer;
switch (columnName) {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -189,9 +189,11 @@
@Override
public void propertyChange(PropertyChangeEvent evt) {
+ Object newValue = evt.getNewValue();
+ Object oldValue = evt.getOldValue();
if (!excludeProperties.contains(evt.getPropertyName())
//check that the new value and old value are not both null
- && evt.getNewValue() != evt.getOldValue()) {
+ && newValue != oldValue) {
((AbstractFaxToMailBeanUIModel) evt.getSource()).setModify(true);
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/DemandeTableModel.java 2014-05-12 20:23:24 UTC (rev 68)
@@ -143,6 +143,12 @@
n("faxtomail.demandeList.table.header.savNb"),
n("faxtomail.demandeList.table.header.savNb.tip")));
+ put(Email.PROPERTY_REPLIES,
+ ColumnIdentifier.<Email>newId(
+ Email.PROPERTY_REPLIES,
+ n("faxtomail.demandeList.table.header.replies"),
+ n("faxtomail.demandeList.table.header.replies.tip")));
+
put(Email.PROPERTY_ATTACHMENT,
ColumnIdentifier.<Email>newId(
Email.PROPERTY_ATTACHMENT,
Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties
===================================================================
--- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-12 16:38:45 UTC (rev 67)
+++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-05-12 20:23:24 UTC (rev 68)
@@ -49,7 +49,7 @@
faxtomail.chooseMailFolder.message=Choisissez le dossier où transférer l'élément \:
faxtomail.chooseMailFolder.title=Dossier de destination
faxtomail.common.by.label=par
-faxtomail.common.none.label=Aucun
+faxtomail.common.none.label=Sans
faxtomail.common.on.label=le
faxtomail.config.application=
faxtomail.config.title=
@@ -63,6 +63,7 @@
faxtomail.demandReplies.empty=Aucune réponse envoyée
faxtomail.demandReplies.text=Réponses (%s)
faxtomail.demandReplies.title=Réponses envoyées
+faxtomail.demandRepliesCellRenderer.text=(%s)
faxtomail.demande.archive.button.label=Archiver
faxtomail.demande.archivedBy.label=Archivé par
faxtomail.demande.askCancelEditBeforeLeaving.cancelSave=L'élément n'est pas valide et ne peut être sauvé.
@@ -89,7 +90,7 @@
faxtomail.demande.group.successful=Groupement réussi avec l'élément %s
faxtomail.demande.lastAttachmentOpening.label=Dernière ouverture de pièce-jointe
faxtomail.demande.lastModified.label=Dernière modification
-faxtomail.demande.localReference.label=Notre référence
+faxtomail.demande.localReference.label=Référence
faxtomail.demande.mailBody.label=Corps du mail
faxtomail.demande.mailFolder.label=Dossier
faxtomail.demande.object.label=Objet
@@ -109,8 +110,8 @@
faxtomail.demande.subject.label=Sujet \:
faxtomail.demande.takenBy.label=Pris par
faxtomail.demande.toRecipients.label=À \:
-faxtomail.demande.transferBy.label=Transmit par
-faxtomail.demande.transmit.button.label=Transmettre
+faxtomail.demande.transferBy.label=Déplacé par
+faxtomail.demande.transmit.button.label=Déplacer
faxtomail.demandeList.action.archive=Archiver
faxtomail.demandeList.action.archive.tip=Archiver l'élément
faxtomail.demandeList.action.attachment=Ajouter une pièce-jointe
@@ -151,6 +152,8 @@
faxtomail.demandeList.table.header.receptionDate.tip=Date de réception
faxtomail.demandeList.table.header.recipient=Destinataire
faxtomail.demandeList.table.header.recipient.tip=Addresse email ou numéro de fax du destinataire
+faxtomail.demandeList.table.header.replies=Réponses
+faxtomail.demandeList.table.header.replies.tip=Réponses envoyées
faxtomail.demandeList.table.header.savNb=Qté SAV
faxtomail.demandeList.table.header.savNb.tip=Quantité de SAV
faxtomail.demandeList.table.header.sender=Émetteur
@@ -222,22 +225,15 @@
faxtomail.reply.title=Réponse à \: %s
faxtomail.search.action.gotoFolder=Aller au dossier
faxtomail.search.action.gotoFolder.tip=Aller au dossier
+faxtomail.search.addGroupedElement.label=Ajouter les éléments groupés aux résultats
faxtomail.search.archivedBetween.label=Archivé entre le
faxtomail.search.between2ndPart.label=et le
faxtomail.search.button.label=Rechercher
-faxtomail.search.chantier.label=Chantier
-faxtomail.search.clientAccount.label=Compte client
-faxtomail.search.comment.label=Commentaire
-faxtomail.search.docType.label=Type document
faxtomail.search.modifiedBetween.label=Modifié entre le
faxtomail.search.modifiedBy.label=Modifié par
faxtomail.search.printedBetween.label=Imprimé entre le
faxtomail.search.receivedBetween.label=Reçu entre le
-faxtomail.search.ref.label=Référence
faxtomail.search.resultNb=Nombre de résultats \: %s
-faxtomail.search.sender.label=Émetteur
-faxtomail.search.status.label=Statut
-faxtomail.search.subject.label=Objet
faxtomail.search.title=Recherche
faxtomail.search.transferBetween.label=Transmit entre le
faxtomail.searchToGroup.action.cancel=Annuler
1
0
r67 - in trunk: faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities faxtomail-persistence/src/main/resources faxtomail-persistence/src/main/xmi faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search src/rst
by echatellier@users.forge.codelutin.com 12 May '14
by echatellier@users.forge.codelutin.com 12 May '14
12 May '14
Author: echatellier
Date: 2014-05-12 18:38:45 +0200 (Mon, 12 May 2014)
New Revision: 67
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/67
Log:
Update application to run with sql server
Added:
trunk/src/rst/mssql.rst
Modified:
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
trunk/faxtomail-persistence/src/main/resources/faxToMail.properties
trunk/faxtomail-persistence/src/main/xmi/faxtomail.properties
trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailFilter.java 2014-05-12 16:38:45 UTC (rev 67)
@@ -41,7 +41,7 @@
public static final String PROPERTY_SENDER = "sender";
//public static final String PROPERTY_RECIPIENT = "recipient";
- public static final String PROPERTY_OBJECT = "object";
+ public static final String PROPERTY_SUBJECT = "subject";
public static final String PROPERTY_MESSAGE = "message";
public static final String PROPERTY_BODY = "body";
public static final String PROPERTY_ETAT_ATTENTE = "etatAttente";
@@ -74,7 +74,7 @@
//protected String recipient;
- protected String object;
+ protected String subject;
protected String message;
@@ -150,14 +150,14 @@
firePropertyChange(PROPERTY_RECIPIENT, oldValue, recipient);
}*/
- public String getObject() {
- return object;
+ public String getSubject() {
+ return subject;
}
- public void setObject(String object) {
- String oldValue = this.object;
- this.object = object;
- firePropertyChange(PROPERTY_OBJECT, oldValue, object);
+ public void setSubject(String subject) {
+ String oldValue = this.subject;
+ this.subject = subject;
+ firePropertyChange(PROPERTY_SUBJECT, oldValue, subject);
}
public List<EtatAttente> getEtatAttente() {
Modified: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java
===================================================================
--- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/EmailTopiaDao.java 2014-05-12 16:38:45 UTC (rev 67)
@@ -33,58 +33,6 @@
public class EmailTopiaDao extends AbstractEmailTopiaDao<Email> {
- /*@Override
- public MyInnerTopiaQueryBuilderAddCriteriaOrRunQueryStep newQueryBuilder() {
- MyHqlAndParametersBuilder hqlAndParametersBuilder = new MyHqlAndParametersBuilder(getEntityClass());
- MyInnerTopiaQueryBuilderAddCriteriaOrRunQueryStep result = new MyInnerTopiaQueryBuilderAddCriteriaOrRunQueryStep(this, hqlAndParametersBuilder);
- return result;
- }
-
- public static class MyInnerTopiaQueryBuilderAddCriteriaOrRunQueryStep extends InnerTopiaQueryBuilderAddCriteriaOrRunQueryStep<Email> {
-
- protected MyInnerTopiaQueryBuilderAddCriteriaOrRunQueryStep(AbstractTopiaDao<Email> topiaDAO,
- HqlAndParametersBuilder<Email> hqlAndParametersBuilder) {
- super(topiaDAO, hqlAndParametersBuilder);
- }
-
- public MyInnerTopiaQueryBuilderAddCriteriaOrRunQueryStep addContainsText(String property, Object value) {
- ((MyHqlAndParametersBuilder) hqlAndParametersBuilder).addContainsText(property, value);
- return this;
- }
-
- public MyInnerTopiaQueryBuilderAddCriteriaOrRunQueryStep addEqualsIfNotNull(String property, Object value) {
- ((MyHqlAndParametersBuilder) hqlAndParametersBuilder).addEqualsIfNotNull(property, value);
- return this;
- }
- }
-
- public static class MyHqlAndParametersBuilder extends HqlAndParametersBuilder<Email> {
-
- public MyHqlAndParametersBuilder(Class<Email> entityClass) {
- super(entityClass);
- }
-
- public void addContainsText(String property, Object value) {
- Preconditions.checkArgument(StringUtils.isNotEmpty(property));
- // TODO brendan 02/10/13 do not use HQL parameters of Object are primitive types
- // TODO brendan 02/10/13 if value is intanceof TopiaEntity, we can check type
- if (value != null) {
- String hqlParameterName = putHqlParameterWithAvailableName(property, "%" + value + "%");
- whereClauses.add("lower(" + alias + "." + property + ") like lower(:" + hqlParameterName + ")");
- }
- }
-
- public void addEqualsIfNotNull(String property, Object value) {
- Preconditions.checkArgument(StringUtils.isNotEmpty(property));
- // TODO brendan 02/10/13 do not use HQL parameters of Object are primitive types
- // TODO brendan 02/10/13 if value is intanceof TopiaEntity, we can check type
- if (value != null) {
- String hqlParameterName = putHqlParameterWithAvailableName(property, value);
- whereClauses.add(alias + "." + property + " = :" + hqlParameterName);
- }
- }
- }*/
-
/**
* Search for email using filter.
*
@@ -256,9 +204,9 @@
}
// email subject
- if (StringUtils.isNotBlank(emailFilter.getObject())) {
- query.append(" AND lower(E." + Email.PROPERTY_OBJECT + ") LIKE lower(:" + EmailFilter.PROPERTY_OBJECT + ")");
- args.put(EmailFilter.PROPERTY_OBJECT, "%" + emailFilter.getObject() + "%");
+ if (StringUtils.isNotBlank(emailFilter.getSubject())) {
+ query.append(" AND lower(E." + Email.PROPERTY_OBJECT + ") LIKE lower(:" + EmailFilter.PROPERTY_SUBJECT + ")");
+ args.put(EmailFilter.PROPERTY_SUBJECT, "%" + emailFilter.getSubject() + "%");
}
// email demand type
Modified: trunk/faxtomail-persistence/src/main/resources/faxToMail.properties
===================================================================
--- trunk/faxtomail-persistence/src/main/resources/faxToMail.properties 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-persistence/src/main/resources/faxToMail.properties 2014-05-12 16:38:45 UTC (rev 67)
@@ -21,27 +21,25 @@
# <http://www.gnu.org/licenses/gpl-3.0.html>.
# #L%
###
+
+hibernate.dialect=org.hibernate.dialect.H2Dialect
hibernate.connection.driver_class=org.h2.Driver
hibernate.connection.url=jdbc:h2:file:/tmp/faxtomail/h2data;MODE=MSSQLServer
hibernate.connection.username=sa
hibernate.connection.password=
+#hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
#hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
#hibernate.connection.url=jdbc:jtds:sqlserver://192.168.100.247:1433/faxtomail
#hibernate.connection.username=fx
#hibernate.connection.password=FX2013!
-#hibernate.dialect=org.hibernate.dialect.SQLServerDialect
-
-hibernate.dialect=org.hibernate.dialect.H2Dialect
hibernate.hbm2ddl.auto=update
-#hibernate.show_sql=false
-#hibernate.format_sql=true
-hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy
+hibernate.show_sql=false
+hibernate.format_sql=true
+#hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy
hibernate.c3p0.min_size=5
hibernate.c3p0.max_size=20
hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=50
-
-# hibernate.connection.provider_class=org.nuiton.topia.framework.TopiaConnectionProvider
Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.properties
===================================================================
--- trunk/faxtomail-persistence/src/main/xmi/faxtomail.properties 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-persistence/src/main/xmi/faxtomail.properties 2014-05-12 16:38:45 UTC (rev 67)
@@ -24,6 +24,5 @@
model.tagValue.notGenerateToString=true
model.tagValue.constantPrefix=PROPERTY_
model.tagValue.java.lang.String=text
-#model.tagValue.java.lang.String=nvarchar($l)
model.tagValue.useEnumerationName=true
model.tagValue.doNotGenerateBooleanGetMethods=true
Modified: trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java
===================================================================
--- trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/EmailServiceTest.java 2014-05-12 16:38:45 UTC (rev 67)
@@ -76,7 +76,7 @@
Assert.assertEquals(18, emails.size());
// client code filter + subject filter
- filter.setObject("ARENO");
+ filter.setSubject("ARENO");
emails = service.search(filter);
Assert.assertEquals(2, emails.size());
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.css 2014-05-12 16:38:45 UTC (rev 67)
@@ -149,7 +149,7 @@
}
#subjectField {
- text: {model.getObject()};
+ text: {model.getSubject()};
}
#senderLabel {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUI.jaxx 2014-05-12 16:38:45 UTC (rev 67)
@@ -216,7 +216,7 @@
</cell>
<cell columns='3' weightx='1'>
<JTextField id='subjectField'
- onKeyReleased='handler.setText(event, "object")'/>
+ onKeyReleased='handler.setText(event, "subject")'/>
</cell>
<cell>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-05-12 16:38:45 UTC (rev 67)
@@ -154,7 +154,7 @@
}
#subjectField {
- text: {model.getObject()};
+ text: {model.getSubject()};
}
#senderLabel {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-05-12 16:38:45 UTC (rev 67)
@@ -227,7 +227,7 @@
</cell>
<cell columns='3' weightx='1'>
<JTextField id='subjectField'
- onKeyReleased='handler.setText(event, "object")'/>
+ onKeyReleased='handler.setText(event, "subject")'/>
</cell>
<cell>
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-05-12 15:22:09 UTC (rev 66)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-05-12 16:38:45 UTC (rev 67)
@@ -91,14 +91,14 @@
return editObject.getRecipient();
}*/
- public void setObject(String object) {
- Object oldValue = getObject();
- editObject.setObject(object);
- firePropertyChanged(EmailFilter.PROPERTY_OBJECT, oldValue, object);
+ public void setSubject(String subject) {
+ Object oldValue = getSubject();
+ editObject.setSubject(subject);
+ firePropertyChanged(EmailFilter.PROPERTY_SUBJECT, oldValue, subject);
}
- public String getObject() {
- return editObject.getObject();
+ public String getSubject() {
+ return editObject.getSubject();
}
public void setClientCode(String clientCode) {
Added: trunk/src/rst/mssql.rst
===================================================================
--- trunk/src/rst/mssql.rst (rev 0)
+++ trunk/src/rst/mssql.rst 2014-05-12 16:38:45 UTC (rev 67)
@@ -0,0 +1,41 @@
+.. -
+.. * #%L
+.. * FaxToMail
+.. * $Id$
+.. * $HeadURL$
+.. * %%
+.. * Copyright (C) 2014 Franciaflex, Code Lutin
+.. * %%
+.. * This program is free software: you can redistribute it and/or modify
+.. * it under the terms of the GNU 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 General Public
+.. * License along with this program. If not, see
+.. * <http://www.gnu.org/licenses/gpl-3.0.html>.
+.. * #L%
+.. -
+
+Déploiement sur MS-SQL Server
+=============================
+
+Le serveur testé a été ::
+
+ Microsoft SQL Server 2008 (SP3) - 10.0.5500.0 (X64)
+ Sep 21 2011 22:45:45
+ Copyright (c) 1988-2008 Microsoft Corporation
+ Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (VM)
+
+La configuration à ajouter dans le fichier de configuration ``C:\Windows\System32\faxToMail.properties``::
+
+ hibernate.dialect=org.hibernate.dialect.SQLServer2008Dialect
+ hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
+ hibernate.connection.url=jdbc:jtds:sqlserver://192.168.100.247:1433/faxtomail
+ hibernate.connection.username=fx
+ hibernate.connection.password=FX2013!
Property changes on: trunk/src/rst/mssql.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
r66 - in trunk: faxtomail-persistence/src/main/xmi faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web
by echatellier@users.forge.codelutin.com 12 May '14
by echatellier@users.forge.codelutin.com 12 May '14
12 May '14
Author: echatellier
Date: 2014-05-12 17:22:09 +0200 (Mon, 12 May 2014)
New Revision: 66
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/66
Log:
Rename "user" field to "login" (mssql reserved keyword)
Modified:
trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/EmailAccountImportModel.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/MailFilterJob.java
Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo
===================================================================
(Binary files differ)
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/EmailAccountImportModel.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/EmailAccountImportModel.java 2014-05-12 15:21:31 UTC (rev 65)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/imports/EmailAccountImportModel.java 2014-05-12 15:22:09 UTC (rev 66)
@@ -42,7 +42,7 @@
newMandatoryColumn("protocol", EmailAccount.PROPERTY_PROTOCOL);
newMandatoryColumn("host", EmailAccount.PROPERTY_HOST);
- newMandatoryColumn("user", EmailAccount.PROPERTY_USER);
+ newMandatoryColumn("user", EmailAccount.PROPERTY_LOGIN);
newMandatoryColumn("password", EmailAccount.PROPERTY_PASSWORD);
}
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/MailFilterJob.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/MailFilterJob.java 2014-05-12 15:21:31 UTC (rev 65)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/MailFilterJob.java 2014-05-12 15:22:09 UTC (rev 66)
@@ -116,7 +116,7 @@
Properties properties = new Properties();
properties.setProperty("mail.store.protocol", "pop3");
properties.setProperty("mail.pop3.host", account.getHost());
- properties.setProperty("mail.pop3.user", account.getUser());
+ properties.setProperty("mail.pop3.user", account.getLogin());
Session session = Session.getInstance(properties);
Store store = null;
@@ -125,7 +125,7 @@
try {
store = session.getStore(new URLName("pop3://" + account.getHost()));
- store.connect(account.getUser(), account.getPassword());
+ store.connect(account.getLogin(), account.getPassword());
defaultFolder = store.getDefaultFolder();
inbox = defaultFolder.getFolder("INBOX");
checkEmailsOfFolder(inbox);
1
0