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
August 2014
- 4 participants
- 141 discussions
Author: echatellier
Date: 2014-08-13 15:59:23 +0200 (Wed, 13 Aug 2014)
New Revision: 547
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/547
Log:
Update nuiton-utils
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-08-13 13:58:38 UTC (rev 546)
+++ trunk/pom.xml 2014-08-13 13:59:23 UTC (rev 547)
@@ -101,7 +101,7 @@
<nuitonCsvVersion>3.0-rc-4</nuitonCsvVersion>
<nuitonDecoratorVersion>3.0-alpha-3</nuitonDecoratorVersion>
<nuitonUpdaterVersion>3.0-alpha-2</nuitonUpdaterVersion>
- <nuitonUtilsVersion>3.0-rc-5</nuitonUtilsVersion>
+ <nuitonUtilsVersion>3.0-rc-6</nuitonUtilsVersion>
<nuitonValidatorVersion>3.0-rc-2</nuitonValidatorVersion>
<nuitonWebVersion>1.16</nuitonWebVersion>
1
0
r546 - trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util
by echatellier@users.forge.codelutin.com 13 Aug '14
by echatellier@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: echatellier
Date: 2014-08-13 15:58:38 +0200 (Wed, 13 Aug 2014)
New Revision: 546
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/546
Log:
Remove always on top and confirm on exit
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java
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-08-13 13:29:36 UTC (rev 545)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-08-13 13:58:38 UTC (rev 546)
@@ -325,7 +325,6 @@
});
result.setSize(dim);
- result.setAlwaysOnTop(true);
SwingUtil.center(parentContainer, result);
result.setVisible(true);
}
@@ -390,8 +389,8 @@
protected void closeFrame(JFrame frame, AbstractApplicationUIHandler handler) {
boolean canClose = true;
- if (this instanceof CloseableUI) {
- canClose = ((CloseableUI) this).quitUI();
+ if (handler instanceof CloseableUI) {
+ canClose = ((CloseableUI) handler).quitUI();
}
if (canClose) {
frame.dispose();
1
0
r545 - in trunk: faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search
by echatellier@users.forge.codelutin.com 13 Aug '14
by echatellier@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: echatellier
Date: 2014-08-13 15:29:36 +0200 (Wed, 13 Aug 2014)
New Revision: 545
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/545
Log:
Add referenteil cache
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielService.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielServiceImpl.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java
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/search/SearchToGroupUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielService.java 2014-08-13 12:19:21 UTC (rev 544)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielService.java 2014-08-13 13:29:36 UTC (rev 545)
@@ -52,8 +52,6 @@
Map<String, Long> getEtatAttentesUsage();
- List<Client> getAllClients();
-
List<Client> importClients(InputStream inputStream);
List<EmailAccount> importEmailAccounts(InputStream inputStream);
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielServiceImpl.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielServiceImpl.java 2014-08-13 12:19:21 UTC (rev 544)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ReferentielServiceImpl.java 2014-08-13 13:29:36 UTC (rev 545)
@@ -100,12 +100,6 @@
}
@Override
- public List<Client> getAllClients() {
- ClientTopiaDao dao = getPersistenceContext().getClientDao();
- return dao.findAll();
- }
-
- @Override
public List<Client> importClients(InputStream inputStream) {
List<Client> result = new ArrayList<>();
ClientTopiaDao dao = getPersistenceContext().getClientDao();
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java 2014-08-13 12:19:21 UTC (rev 544)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java 2014-08-13 13:29:36 UTC (rev 545)
@@ -38,8 +38,6 @@
import javax.swing.JFrame;
import javax.swing.JOptionPane;
-import com.franciaflex.faxtomail.services.service.InitFaxToMailServiceImpl;
-
import jaxx.runtime.swing.editor.bean.BeanDoubleList;
import jaxx.runtime.swing.editor.bean.BeanFilterableComboBox;
import jaxx.runtime.swing.session.BeanDoubleListState;
@@ -61,7 +59,6 @@
import org.nuiton.i18n.init.DefaultI18nInitializer;
import org.nuiton.jaxx.application.ApplicationBusinessException;
import org.nuiton.jaxx.application.ApplicationConfiguration;
-import org.nuiton.jaxx.application.ApplicationTechnicalException;
import org.nuiton.jaxx.application.swing.ApplicationUIContext;
import org.nuiton.jaxx.application.swing.action.ApplicationActionEngine;
import org.nuiton.jaxx.application.swing.action.ApplicationActionFactory;
@@ -71,11 +68,17 @@
import com.franciaflex.faxtomail.FaxToMailConfiguration;
import com.franciaflex.faxtomail.persistence.RessourceClassLoader;
+import com.franciaflex.faxtomail.persistence.entities.DemandType;
+import com.franciaflex.faxtomail.persistence.entities.EtatAttente;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailTopiaApplicationContext;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.persistence.entities.MailFolder;
+import com.franciaflex.faxtomail.persistence.entities.Priority;
+import com.franciaflex.faxtomail.persistence.entities.Range;
import com.franciaflex.faxtomail.services.FaxToMailServiceContext;
import com.franciaflex.faxtomail.services.service.InitFaxToMailService;
+import com.franciaflex.faxtomail.services.service.ReferentielService;
+import com.franciaflex.faxtomail.services.service.UserService;
import com.franciaflex.faxtomail.services.service.ldap.AuthenticationException;
import com.franciaflex.faxtomail.ui.swing.content.MainUI;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
@@ -185,6 +188,17 @@
protected SearchUIModel search;
+ /** Active user cache. */
+ protected List<FaxToMailUser> faxtomailUserCache;
+ /** Etat attente cache. */
+ protected List<EtatAttente> etatAttenteCache;
+ /** Demand type cache. */
+ protected List<DemandType> demandTypeCache;
+ /** Priority cache. */
+ protected List<Priority> priorityCache;
+ /** Range cache. */
+ protected List<Range> rangeCache;
+
public static FaxToMailUIContext newContext(FaxToMailConfiguration config) {
Preconditions.checkNotNull(config);
Preconditions.checkState(applicationContext == null,
@@ -338,8 +352,8 @@
// try to autologin user from username of current X session
autologinUser();
- //Configuration config = getConfigurationService().getConfiguration();
- //setFaxToMailConfiguration(config);
+ // init cache
+ initContextCache();
//--------------------------------------------------------------------//
// init action UI
@@ -348,6 +362,25 @@
}
/**
+ * Init list used in application wide scope and put it in cache.
+ */
+ protected void initContextCache() {
+ if (log.isInfoEnabled()) {
+ log.info("Adding referentiel in cache");
+ }
+ FaxToMailServiceContext serviceContext = newServiceContext();
+ // referentiel
+ ReferentielService referentielService = serviceContext.getReferentielService();
+ setRangeCache(referentielService.getAllRange());
+ setDemandTypeCache(referentielService.getAllDemandType());
+ setEtatAttenteCache(referentielService.getAllEtatAttente());
+ setPriorityCache(referentielService.getAllPriority());
+ // users
+ UserService userService = serviceContext.getUserService();
+ setFaxtomailUserCache(userService.getAllActiveUsers());
+ }
+
+ /**
* Recupere l'utilisateur connecté ou demande les identifiants à l'utilisateur.
*/
protected void autologinUser() {
@@ -419,10 +452,6 @@
setLocale(config.getI18nLocale());
-// boolean dbExists = config.isDbExists();
-//
-// setDbExist(dbExists);
-
// save back to config
saveContextToConfig();
@@ -479,10 +508,6 @@
}
//------------------------------------------------------------------------//
- //-- DataContext methods --//
- //------------------------------------------------------------------------//
-
- //------------------------------------------------------------------------//
//-- Config methods --//
//------------------------------------------------------------------------//
@@ -662,4 +687,44 @@
public void setSearch(SearchUIModel search) {
this.search = search;
}
+
+ public List<FaxToMailUser> getFaxtomailUserCache() {
+ return faxtomailUserCache;
+ }
+
+ public void setFaxtomailUserCache(List<FaxToMailUser> faxtomailUserCache) {
+ this.faxtomailUserCache = faxtomailUserCache;
+ }
+
+ public List<EtatAttente> getEtatAttenteCache() {
+ return etatAttenteCache;
+ }
+
+ public void setEtatAttenteCache(List<EtatAttente> etatAttenteCache) {
+ this.etatAttenteCache = etatAttenteCache;
+ }
+
+ public List<DemandType> getDemandTypeCache() {
+ return demandTypeCache;
+ }
+
+ public void setDemandTypeCache(List<DemandType> demandTypeCache) {
+ this.demandTypeCache = demandTypeCache;
+ }
+
+ public List<Priority> getPriorityCache() {
+ return priorityCache;
+ }
+
+ public void setPriorityCache(List<Priority> priorityCache) {
+ this.priorityCache = priorityCache;
+ }
+
+ public List<Range> getRangeCache() {
+ return rangeCache;
+ }
+
+ public void setRangeCache(List<Range> rangeCache) {
+ this.rangeCache = rangeCache;
+ }
}
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-08-13 12:19:21 UTC (rev 544)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-08-13 13:29:36 UTC (rev 545)
@@ -135,17 +135,15 @@
});
MailFolder folder = model.getMailFolder();
- final FaxToMailServiceContext serviceContext = getContext().newServiceContext();
- ReferentielService referentielService = serviceContext.getReferentielService();
- initBeanFilterableComboBox(ui.getPriorityComboBox(), referentielService.getAllPriority(), model.getPriority());
+ initBeanFilterableComboBox(ui.getPriorityComboBox(), getContext().getPriorityCache(), model.getPriority());
initBeanFilterableComboBox(ui.getStatusComboBox(), Arrays.asList(DemandStatus.values()), model.getDemandStatus());
// utilisation des etats d'attente défini pour le dossier (si défini)
List<DemandType> demandTypes = new ArrayList<DemandType>();
Collection<DemandType> folderDemandTypes = getDemandTypeForFolder(folder);
if (CollectionUtils.isEmpty(folderDemandTypes)) {
- demandTypes.addAll(referentielService.getAllDemandType());
+ demandTypes.addAll(getContext().getDemandTypeCache());
} else {
demandTypes.addAll(folderDemandTypes);
}
@@ -155,7 +153,7 @@
List<EtatAttente> etatAttentes = new ArrayList<EtatAttente>();
Collection<EtatAttente> folderEtatAttentes = getEtatAttenteForFolder(folder);
if (CollectionUtils.isEmpty(folderEtatAttentes)) {
- etatAttentes.addAll(referentielService.getAllEtatAttente());
+ etatAttentes.addAll(getContext().getEtatAttenteCache());
} else {
etatAttentes.addAll(folderEtatAttentes);
}
@@ -171,7 +169,7 @@
List<Range> ranges = new ArrayList<Range>();
Collection<Range> folderRanges = getRangeForFolder(folder);
if (CollectionUtils.isEmpty(folderRanges)) {
- ranges.addAll(referentielService.getAllRange());
+ ranges.addAll(getContext().getRangeCache());
} else {
ranges.addAll(folderRanges);
}
@@ -363,6 +361,7 @@
} else {
filename = FaxToMailUIUtil.getEditedFileName(attachment.getOriginalFileName());
}
+ FaxToMailServiceContext serviceContext = getContext().newServiceContext();
Email email = serviceContext.getEmailService().addToHistory(topiaId,
HistoryType.ATTACHMENT_OPENING,
getContext().getCurrentUser(),
@@ -376,6 +375,7 @@
public void onAttachmentEdited(Attachment attachment) {
String topiaId = getModel().getTopiaId();
if (topiaId != null) {
+ FaxToMailServiceContext serviceContext = getContext().newServiceContext();
Email email = serviceContext.getEmailService().addToHistory(topiaId,
HistoryType.ATTACHMENT_MODIFICATION,
getContext().getCurrentUser(),
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-08-13 12:19:21 UTC (rev 544)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-08-13 13:29:36 UTC (rev 545)
@@ -28,10 +28,7 @@
import com.franciaflex.faxtomail.persistence.entities.EmailFilter;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.persistence.entities.MailField;
-import com.franciaflex.faxtomail.services.FaxToMailServiceContext;
-import com.franciaflex.faxtomail.services.service.ReferentielService;
import com.franciaflex.faxtomail.ui.swing.actions.GroupAction;
-import com.franciaflex.faxtomail.ui.swing.actions.SearchAction;
import com.franciaflex.faxtomail.ui.swing.actions.SearchToGroupAction;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailDemandListHandler;
@@ -116,10 +113,7 @@
public void afterInit(SearchToGroupUI ui) {
initUI(ui);
- FaxToMailServiceContext serviceContext = getContext().newServiceContext();
- ReferentielService referentielService = serviceContext.getReferentielService();
-
- List<FaxToMailUser> users = serviceContext.getUserService().getAllActiveUsers();
+ List<FaxToMailUser> users = getContext().getFaxtomailUserCache();
SearchUIModel model = getModel();
initBeanFilterableComboBox(ui.getTakenByComboBox(),
users,
@@ -141,17 +135,17 @@
model.getReplyBy());
initCheckBoxComboBox(ui.getDocTypeComboBox(),
- referentielService.getAllDemandType(),
+ getContext().getDemandTypeCache(),
model.getDemandType(),
EmailFilter.PROPERTY_DEMAND_TYPE,
true);
initCheckBoxComboBox(ui.getPriorityComboBox(),
- referentielService.getAllPriority(),
+ getContext().getPriorityCache(),
model.getPriority(),
EmailFilter.PROPERTY_PRIORITY,
true);
initCheckBoxComboBox(ui.getEtatAttenteComboBox(),
- referentielService.getAllEtatAttente(),
+ getContext().getEtatAttenteCache(),
model.getEtatAttente(),
EmailFilter.PROPERTY_ETAT_ATTENTE,
true);
@@ -161,7 +155,7 @@
EmailFilter.PROPERTY_DEMAND_STATUS,
false);
initCheckBoxComboBox(ui.getGammeComboBox(),
- referentielService.getAllRange(),
+ getContext().getRangeCache(),
model.getGamme(),
EmailFilter.PROPERTY_GAMME,
false);
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-08-13 12:19:21 UTC (rev 544)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-08-13 13:29:36 UTC (rev 545)
@@ -48,7 +48,6 @@
import com.franciaflex.faxtomail.persistence.entities.EmailFilter;
import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser;
import com.franciaflex.faxtomail.persistence.entities.MailField;
-import com.franciaflex.faxtomail.services.service.ReferentielService;
import com.franciaflex.faxtomail.ui.swing.actions.SearchAction;
import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeListAction;
import com.franciaflex.faxtomail.ui.swing.content.demande.DemandeUIModel;
@@ -100,10 +99,8 @@
initUI(ui);
- final ReferentielService referentielService = getContext().newServiceContext().getReferentielService();
-
// this loading take 1,5 seconds
- List<FaxToMailUser> users = getContext().newServiceContext().getUserService().getAllActiveUsers();
+ List<FaxToMailUser> users = getContext().getFaxtomailUserCache();
SearchUIModel model = getModel();
initBeanFilterableComboBox(ui.getTakenByComboBox(),
users,
@@ -125,17 +122,17 @@
model.getReplyBy());
initCheckBoxComboBox(ui.getDocTypeComboBox(),
- referentielService.getAllDemandType(),
+ getContext().getDemandTypeCache(),
model.getDemandType(),
EmailFilter.PROPERTY_DEMAND_TYPE,
true);
initCheckBoxComboBox(ui.getPriorityComboBox(),
- referentielService.getAllPriority(),
+ getContext().getPriorityCache(),
model.getPriority(),
EmailFilter.PROPERTY_PRIORITY,
true);
initCheckBoxComboBox(ui.getEtatAttenteComboBox(),
- referentielService.getAllEtatAttente(),
+ getContext().getEtatAttenteCache(),
model.getEtatAttente(),
EmailFilter.PROPERTY_ETAT_ATTENTE,
true);
@@ -145,7 +142,7 @@
EmailFilter.PROPERTY_DEMAND_STATUS,
false);
initCheckBoxComboBox(ui.getGammeComboBox(),
- referentielService.getAllRange(),
+ getContext().getRangeCache(),
model.getGamme(),
EmailFilter.PROPERTY_GAMME,
false);
1
0
r544 - trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions
by kmorin@users.forge.codelutin.com 13 Aug '14
by kmorin@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: kmorin
Date: 2014-08-13 14:19:21 +0200 (Wed, 13 Aug 2014)
New Revision: 544
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/544
Log:
demande ?\195?\160 sauver lorsqu'on quitte l'appli
Modified:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/CloseApplicationAction.java
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/CloseApplicationAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/CloseApplicationAction.java 2014-08-13 12:13:19 UTC (rev 543)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/CloseApplicationAction.java 2014-08-13 12:19:21 UTC (rev 544)
@@ -32,13 +32,12 @@
*
* @author kmorin - morin(a)codelutin.com
*/
-public class CloseApplicationAction extends AbstractChangeScreenAction {
+public class CloseApplicationAction extends AbstractMainUIFaxToMailAction {
protected int exitCode = RunFaxToMail.NORMAL_EXIT_CODE;
public CloseApplicationAction(MainUIHandler handler) {
- super(handler, false, null);
- setSkipCheckCurrentScreen(true);
+ super(handler, false);
setActionDescription(t("faxtomail.action.exit.tip"));
}
@@ -48,9 +47,6 @@
@Override
public void doAction() throws Exception {
-
- super.doAction();
-
RunFaxToMail.closeFaxToMail(getHandler(), exitCode);
}
1
0
r543 - in trunk/faxtomail-service/src: main/java/com/franciaflex/faxtomail/services/service/migration main/resources/db/migration main/resources/db/migration/h2 main/resources/db/migration/postgres main/resources/db/migration/sqlserver test/java/com/franciaflex/faxtomail/services/service/migration
by echatellier@users.forge.codelutin.com 13 Aug '14
by echatellier@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: echatellier
Date: 2014-08-13 14:13:19 +0200 (Wed, 13 Aug 2014)
New Revision: 543
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/543
Log:
Duplicates migration scripts for h2/postgres/sqlserver.
Added:
trunk/faxtomail-service/src/main/resources/db/migration/h2/
trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_442__move_object_to_folder_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_448__add_mail_folder_level_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_454__add_ldap_config.sql
trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_520__add_performance_indexes.sql
trunk/faxtomail-service/src/main/resources/db/migration/postgres/
trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_442__move_object_to_folder_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_448__add_mail_folder_level_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_454__add_ldap_config.sql
trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_520__add_performance_indexes.sql
trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/
trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_442__move_object_to_folder_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_448__add_mail_folder_level_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_454__add_ldap_config.sql
trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_520__add_performance_indexes.sql
Removed:
trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_442__move_object_to_folder_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_448__add_mail_folder_level_configuration.sql
trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_454__add_ldap_config.sql
trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_520__add_performance_indexes.sql
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/migration/FaxtomailFlywayMigrationService.java
trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/migration/FlywayMigrationTest.java
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/migration/FaxtomailFlywayMigrationService.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/migration/FaxtomailFlywayMigrationService.java 2014-08-13 10:16:46 UTC (rev 542)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/migration/FaxtomailFlywayMigrationService.java 2014-08-13 12:13:19 UTC (rev 543)
@@ -1,14 +1,5 @@
package com.franciaflex.faxtomail.services.service.migration;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.flywaydb.core.Flyway;
-import org.hibernate.cfg.Environment;
-import org.nuiton.topia.flyway.TopiaFlywayServiceImpl;
-import org.nuiton.topia.persistence.TopiaApplicationContext;
-
/*
* #%L
* FaxToMail :: Service
@@ -33,6 +24,12 @@
* #L%
*/
+import org.apache.commons.lang3.StringUtils;
+import org.flywaydb.core.Flyway;
+import org.hibernate.cfg.Environment;
+import org.nuiton.topia.flyway.TopiaFlywayServiceImpl;
+import org.nuiton.topia.persistence.TopiaApplicationContext;
+
/**
* Surcharge du service de migration flayway par default pour pouvoir définir des scripts pour
* plusieurs type de base de données.
@@ -42,30 +39,19 @@
public class FaxtomailFlywayMigrationService extends TopiaFlywayServiceImpl {
@Override
- protected void doExtraConfiguration(Flyway flyway, TopiaApplicationContext topiaApplicationContext) {
+ protected void setLocations(Flyway flyway, TopiaApplicationContext topiaApplicationContext) {
- Map<String, String> placeholders = new HashMap<>();
+ String specificDirectory;
String dialect = (String)topiaApplicationContext.getConfiguration().get(Environment.DIALECT);
if (StringUtils.startsWith(dialect, "org.hibernate.dialect.SQLServer")) {
- // type for sqlserver
- placeholders.put("timestampType", "datetime2");
- placeholders.put("integerType", "bigint");
- placeholders.put("booleanType", "bit");
- placeholders.put("indexType", "integer");
+ specificDirectory = "db/migration/sqlserver";
} else if (StringUtils.startsWith(dialect, "org.hibernate.dialect.PostgreSQL")) {
- // type for postgres
- placeholders.put("timestampType", "timestamp");
- placeholders.put("integerType", "int8");
- placeholders.put("booleanType", "boolean");
- placeholders.put("indexType", "int4");
+ specificDirectory = "db/migration/postgres";
} else {
- // types for h2
- placeholders.put("timestampType", "timestamp");
- placeholders.put("integerType", "bigint");
- placeholders.put("booleanType", "boolean");
- placeholders.put("indexType", "integer");
+ specificDirectory = "db/migration/h2";
}
- flyway.setPlaceholders(placeholders);
+ flyway.setLocations(specificDirectory);
}
+
}
Deleted: trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_442__move_object_to_folder_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_442__move_object_to_folder_configuration.sql 2014-08-13 10:16:46 UTC (rev 542)
+++ trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_442__move_object_to_folder_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -1,60 +0,0 @@
-
--- move lock out of business model and to his own table
-alter table email drop column lockedby;
-create table mailLock (
- topiaId varchar(255) not null,
- topiaVersion ${integerType} not null,
- topiaCreateDate ${timestampType},
- lockOn varchar(255) not null,
- lockBy varchar(255) not null,
- primary key (topiaId)
-);
-alter table mailLock
- add constraint UK_cebqxr5mtsd4wmm0x0nwaa5km unique (lockOn);
-alter table mailLock
- add constraint FK_cebqxr5mtsd4wmm0x0nwaa5km
- foreign key (lockOn)
- references email;
-alter table mailLock
- add constraint FK_gwxpc59s0wjg60djbk5xa4d5d
- foreign key (lockBy)
- references faxToMailUser;
-
--- edi transfer for each folder
-alter table demandtype drop column ediTransfer;
-alter table mailfolder add column ediTransfer ${booleanType};
-update mailfolder set ediTransfer = 'f' where parent is null;
-
--- reject allowed for email account
-alter table EmailAccount add column rejectAllowed ${booleanType};
-update EmailAccount set rejectAllowed = 'f';
-
--- demandtype per folder
-create table demandtypes_mailfolder (
- mailFolder varchar(255) not null,
- demandTypes varchar(255) not null
-);
-alter table demandtypes_mailfolder
- add constraint FK_apld4ycj71ouug7vmg5wtr1y9
- foreign key (demandTypes)
- references demandType;
-alter table demandtypes_mailfolder
- add constraint FK_pmybd6fsyapv8ygtn7pjw258k
- foreign key (mailFolder)
- references mailFolder;
-CREATE INDEX idx_MailFolder_demandTypes ON demandtypes_mailfolder(mailFolder);
-
--- range per folder
-create table mailfolder_ranges (
- mailFolder varchar(255) not null,
- ranges varchar(255) not null
-);
-alter table mailfolder_ranges
- add constraint FK_kiolyiaeicw5he7xlima0ugbb
- foreign key (ranges)
- references range;
-alter table mailfolder_ranges
- add constraint FK_h78fwd9gc92wh7vw612q48xrr
- foreign key (mailFolder)
- references mailFolder;
-CREATE INDEX idx_MailFolder_ranges ON mailfolder_ranges(mailFolder);
Deleted: trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_448__add_mail_folder_level_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_448__add_mail_folder_level_configuration.sql 2014-08-13 10:16:46 UTC (rev 542)
+++ trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_448__add_mail_folder_level_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -1,6 +0,0 @@
-
--- add mail folder level configuration
-alter table mailfolder add column useCurrentLevelDemandType ${booleanType};
-alter table mailfolder add column useCurrentLevelRange ${booleanType};
-update mailfolder set useCurrentLevelDemandType = 'f';
-update mailfolder set useCurrentLevelRange = 'f';
Deleted: trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_454__add_ldap_config.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_454__add_ldap_config.sql 2014-08-13 10:16:46 UTC (rev 542)
+++ trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_454__add_ldap_config.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -1,6 +0,0 @@
-
--- add user and group hidden configuration
-alter table FaxToMailUserGroup add column hidden ${booleanType};
-update FaxToMailUserGroup set hidden = 'f';
-alter table FaxToMailUser add column hidden ${booleanType};
-update FaxToMailUser set hidden = 'f';
Deleted: trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql 2014-08-13 10:16:46 UTC (rev 542)
+++ trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -1,39 +0,0 @@
-
--- remove unused association
-ALTER TABLE faxtomailusergroup DROP COLUMN faxtomailusergroup;
-
--- add column faxAccountType on emailAccount
-ALTER TABLE emailAccount add column faxAccountType ${booleanType};
-update emailAccount set faxAccountType = 'f';
-
--- add email_idx on attachment
-ALTER TABLE attachment ADD COLUMN email_idx ${indexType};
-
-UPDATE attachment SET email_idx = (
- SELECT COUNT(topiaid) FROM attachment sub
- WHERE sub.email = attachment.email AND (sub.topiacreatedate || sub.topiaid) < (attachment.topiacreatedate || attachment.topiaid)
-);
-
--- add email_idx on history
-ALTER TABLE history ADD COLUMN email_idx ${indexType};
-
-UPDATE history SET email_idx = (
- SELECT COUNT(topiaid) FROM history sub
- WHERE sub.email = history.email AND (sub.topiacreatedate || sub.topiaid) < (history.topiacreatedate || history.topiaid)
-);
-
--- add email_idx on rangeRow
-ALTER TABLE rangeRow ADD COLUMN email_idx ${indexType};
-
-UPDATE rangeRow SET email_idx = (
- SELECT COUNT(topiaid) FROM rangeRow sub
- WHERE sub.email = rangeRow.email AND (sub.topiacreatedate || sub.topiaid) < (rangeRow.topiacreatedate || rangeRow.topiaid)
-);
-
--- add email_idx on reply
-ALTER TABLE reply ADD COLUMN email_idx ${indexType};
-
-UPDATE reply SET email_idx = (
- SELECT COUNT(topiaid) FROM reply sub
- WHERE sub.email = reply.email AND (sub.topiacreatedate || sub.topiaid) < (reply.topiacreatedate || reply.topiaid)
-);
Deleted: trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_520__add_performance_indexes.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_520__add_performance_indexes.sql 2014-08-13 10:16:46 UTC (rev 542)
+++ trunk/faxtomail-service/src/main/resources/db/migration/V1_0_0_520__add_performance_indexes.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -1,18 +0,0 @@
-CREATE INDEX email_receptionDate_idx ON email(receptionDate ASC);
-CREATE INDEX email_archiveDate_idx ON email(archiveDate NULLS FIRST);
-CREATE INDEX email_mailFolder_idx ON email(mailFolder);
-CREATE INDEX email_demandStatus_idx ON email(demandStatus);
-
-CREATE INDEX email_takenBy_idx ON email(takenBy);
-CREATE INDEX email_client_idx ON email(client);
-CREATE INDEX email_etatAttente_idx ON email(etatAttente);
-CREATE INDEX email_priority_idx ON email(priority);
-CREATE INDEX email_demandType_idx ON email(demandType);
-
-CREATE INDEX demandType_fields_OWNER_idx ON demandType_fields(OWNER);
-CREATE INDEX rangeRow_range_idx ON rangeRow(range);
-CREATE INDEX history_faxToMailUser_idx ON history(faxToMailUser);
-CREATE INDEX history_fields_OWNER_idx ON history_fields(OWNER);
-
-CREATE INDEX mailfolder_readrightusers_readRightUsers_idx ON mailfolder_readrightusers(readRightUsers);
-CREATE INDEX mailfolder_readrightgroups_readRightGroups_idx ON mailfolder_readrightgroups(readRightGroups);
Added: trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_442__move_object_to_folder_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_442__move_object_to_folder_configuration.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_442__move_object_to_folder_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,60 @@
+
+-- move lock out of business model and to his own table
+alter table email drop column lockedby;
+create table mailLock (
+ topiaId varchar(255) not null,
+ topiaVersion bigint not null,
+ topiaCreateDate timestamp,
+ lockOn varchar(255) not null,
+ lockBy varchar(255) not null,
+ primary key (topiaId)
+);
+alter table mailLock
+ add constraint UK_cebqxr5mtsd4wmm0x0nwaa5km unique (lockOn);
+alter table mailLock
+ add constraint FK_cebqxr5mtsd4wmm0x0nwaa5km
+ foreign key (lockOn)
+ references email;
+alter table mailLock
+ add constraint FK_gwxpc59s0wjg60djbk5xa4d5d
+ foreign key (lockBy)
+ references faxToMailUser;
+
+-- edi transfer for each folder
+alter table demandtype drop column editransfer;
+alter table mailfolder add editransfer boolean;
+update mailfolder set editransfer = 'f' where parent is null;
+
+-- reject allowed for email account
+alter table EmailAccount add rejectAllowed boolean;
+update EmailAccount set rejectAllowed = 'f';
+
+-- demandtype per folder
+create table demandtypes_mailfolder (
+ mailFolder varchar(255) not null,
+ demandTypes varchar(255) not null
+);
+alter table demandtypes_mailfolder
+ add constraint FK_apld4ycj71ouug7vmg5wtr1y9
+ foreign key (demandTypes)
+ references demandType;
+alter table demandtypes_mailfolder
+ add constraint FK_pmybd6fsyapv8ygtn7pjw258k
+ foreign key (mailFolder)
+ references mailFolder;
+CREATE INDEX idx_MailFolder_demandTypes ON demandtypes_mailfolder(mailFolder);
+
+-- range per folder
+create table mailfolder_ranges (
+ mailFolder varchar(255) not null,
+ ranges varchar(255) not null
+);
+alter table mailfolder_ranges
+ add constraint FK_kiolyiaeicw5he7xlima0ugbb
+ foreign key (ranges)
+ references range;
+alter table mailfolder_ranges
+ add constraint FK_h78fwd9gc92wh7vw612q48xrr
+ foreign key (mailFolder)
+ references mailFolder;
+CREATE INDEX idx_MailFolder_ranges ON mailfolder_ranges(mailFolder);
Added: trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_448__add_mail_folder_level_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_448__add_mail_folder_level_configuration.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_448__add_mail_folder_level_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,6 @@
+
+-- add mail folder level configuration
+alter table mailfolder add useCurrentLevelDemandType boolean;
+alter table mailfolder add useCurrentLevelRange boolean;
+update mailfolder set useCurrentLevelDemandType = 'f';
+update mailfolder set useCurrentLevelRange = 'f';
Added: trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_454__add_ldap_config.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_454__add_ldap_config.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_454__add_ldap_config.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,6 @@
+
+-- add user and group hidden configuration
+alter table FaxToMailUserGroup add hidden boolean;
+alter table FaxToMailUser add hidden boolean;
+update FaxToMailUserGroup set hidden = 'f';
+update FaxToMailUser set hidden = 'f';
Added: trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,39 @@
+
+-- remove unused association
+ALTER TABLE faxtomailusergroup DROP COLUMN faxtomailusergroup;
+
+-- add column faxAccountType on emailAccount
+ALTER TABLE emailAccount add faxAccountType boolean;
+update emailAccount set faxAccountType = 'f';
+
+-- add email_idx on attachment
+ALTER TABLE attachment ADD email_idx integer;
+
+UPDATE attachment SET email_idx = (
+ SELECT COUNT(topiaid) FROM attachment sub
+ WHERE sub.email = attachment.email AND (sub.topiacreatedate || sub.topiaid) < (attachment.topiacreatedate || attachment.topiaid)
+);
+
+-- add email_idx on history
+ALTER TABLE history ADD COLUMN email_idx integer;
+
+UPDATE history SET email_idx = (
+ SELECT COUNT(topiaid) FROM history sub
+ WHERE sub.email = history.email AND (sub.topiacreatedate || sub.topiaid) < (history.topiacreatedate || history.topiaid)
+);
+
+-- add email_idx on rangeRow
+ALTER TABLE rangeRow ADD email_idx integer;
+
+UPDATE rangeRow SET email_idx = (
+ SELECT COUNT(topiaid) FROM rangeRow sub
+ WHERE sub.email = rangeRow.email AND (sub.topiacreatedate || sub.topiaid) < (rangeRow.topiacreatedate || rangeRow.topiaid)
+);
+
+-- add email_idx on reply
+ALTER TABLE reply ADD email_idx integer;
+
+UPDATE reply SET email_idx = (
+ SELECT COUNT(topiaid) FROM reply sub
+ WHERE sub.email = reply.email AND (sub.topiacreatedate || sub.topiaid) < (reply.topiacreatedate || reply.topiaid)
+);
Added: trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_520__add_performance_indexes.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_520__add_performance_indexes.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/h2/V1_0_0_520__add_performance_indexes.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,18 @@
+CREATE INDEX email_receptionDate_idx ON email(receptionDate ASC);
+CREATE INDEX email_archiveDate_idx ON email(archiveDate NULLS FIRST);
+CREATE INDEX email_mailFolder_idx ON email(mailFolder);
+CREATE INDEX email_demandStatus_idx ON email(demandStatus);
+
+CREATE INDEX email_takenBy_idx ON email(takenBy);
+CREATE INDEX email_client_idx ON email(client);
+CREATE INDEX email_etatAttente_idx ON email(etatAttente);
+CREATE INDEX email_priority_idx ON email(priority);
+CREATE INDEX email_demandType_idx ON email(demandType);
+
+CREATE INDEX demandType_fields_OWNER_idx ON demandType_fields(OWNER);
+CREATE INDEX rangeRow_range_idx ON rangeRow(range);
+CREATE INDEX history_faxToMailUser_idx ON history(faxToMailUser);
+CREATE INDEX history_fields_OWNER_idx ON history_fields(OWNER);
+
+CREATE INDEX mailfolder_readrightusers_readRightUsers_idx ON mailfolder_readrightusers(readRightUsers);
+CREATE INDEX mailfolder_readrightgroups_readRightGroups_idx ON mailfolder_readrightgroups(readRightGroups);
Added: trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_442__move_object_to_folder_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_442__move_object_to_folder_configuration.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_442__move_object_to_folder_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,60 @@
+
+-- move lock out of business model and to his own table
+alter table email drop column lockedby;
+create table mailLock (
+ topiaId varchar(255) not null,
+ topiaVersion int8 not null,
+ topiaCreateDate timestamp,
+ lockOn varchar(255) not null,
+ lockBy varchar(255) not null,
+ primary key (topiaId)
+);
+alter table mailLock
+ add constraint UK_cebqxr5mtsd4wmm0x0nwaa5km unique (lockOn);
+alter table mailLock
+ add constraint FK_cebqxr5mtsd4wmm0x0nwaa5km
+ foreign key (lockOn)
+ references email;
+alter table mailLock
+ add constraint FK_gwxpc59s0wjg60djbk5xa4d5d
+ foreign key (lockBy)
+ references faxToMailUser;
+
+-- edi transfer for each folder
+alter table demandtype drop column editransfer;
+alter table mailfolder add editransfer boolean;
+update mailfolder set editransfer = 'f' where parent is null;
+
+-- reject allowed for email account
+alter table EmailAccount add rejectAllowed boolean;
+update EmailAccount set rejectAllowed = 'f';
+
+-- demandtype per folder
+create table demandtypes_mailfolder (
+ mailFolder varchar(255) not null,
+ demandTypes varchar(255) not null
+);
+alter table demandtypes_mailfolder
+ add constraint FK_apld4ycj71ouug7vmg5wtr1y9
+ foreign key (demandTypes)
+ references demandType;
+alter table demandtypes_mailfolder
+ add constraint FK_pmybd6fsyapv8ygtn7pjw258k
+ foreign key (mailFolder)
+ references mailFolder;
+CREATE INDEX idx_MailFolder_demandTypes ON demandtypes_mailfolder(mailFolder);
+
+-- range per folder
+create table mailfolder_ranges (
+ mailFolder varchar(255) not null,
+ ranges varchar(255) not null
+);
+alter table mailfolder_ranges
+ add constraint FK_kiolyiaeicw5he7xlima0ugbb
+ foreign key (ranges)
+ references range;
+alter table mailfolder_ranges
+ add constraint FK_h78fwd9gc92wh7vw612q48xrr
+ foreign key (mailFolder)
+ references mailFolder;
+CREATE INDEX idx_MailFolder_ranges ON mailfolder_ranges(mailFolder);
Added: trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_448__add_mail_folder_level_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_448__add_mail_folder_level_configuration.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_448__add_mail_folder_level_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,6 @@
+
+-- add mail folder level configuration
+alter table mailfolder add useCurrentLevelDemandType boolean;
+alter table mailfolder add useCurrentLevelRange boolean;
+update mailfolder set useCurrentLevelDemandType = 'f';
+update mailfolder set useCurrentLevelRange = 'f';
Added: trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_454__add_ldap_config.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_454__add_ldap_config.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_454__add_ldap_config.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,6 @@
+
+-- add user and group hidden configuration
+alter table FaxToMailUserGroup add hidden boolean;
+alter table FaxToMailUser add hidden boolean;
+update FaxToMailUserGroup set hidden = 'f';
+update FaxToMailUser set hidden = 'f';
Added: trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,39 @@
+
+-- remove unused association
+ALTER TABLE faxtomailusergroup DROP COLUMN faxtomailusergroup;
+
+-- add column faxAccountType on emailAccount
+ALTER TABLE emailAccount add faxAccountType boolean;
+update emailAccount set faxAccountType = 'f';
+
+-- add email_idx on attachment
+ALTER TABLE attachment ADD email_idx int4;
+
+UPDATE attachment SET email_idx = (
+ SELECT COUNT(topiaid) FROM attachment sub
+ WHERE sub.email = attachment.email AND (sub.topiacreatedate || sub.topiaid) < (attachment.topiacreatedate || attachment.topiaid)
+);
+
+-- add email_idx on history
+ALTER TABLE history ADD COLUMN email_idx int4;
+
+UPDATE history SET email_idx = (
+ SELECT COUNT(topiaid) FROM history sub
+ WHERE sub.email = history.email AND (sub.topiacreatedate || sub.topiaid) < (history.topiacreatedate || history.topiaid)
+);
+
+-- add email_idx on rangeRow
+ALTER TABLE rangeRow ADD email_idx int4;
+
+UPDATE rangeRow SET email_idx = (
+ SELECT COUNT(topiaid) FROM rangeRow sub
+ WHERE sub.email = rangeRow.email AND (sub.topiacreatedate || sub.topiaid) < (rangeRow.topiacreatedate || rangeRow.topiaid)
+);
+
+-- add email_idx on reply
+ALTER TABLE reply ADD email_idx int4;
+
+UPDATE reply SET email_idx = (
+ SELECT COUNT(topiaid) FROM reply sub
+ WHERE sub.email = reply.email AND (sub.topiacreatedate || sub.topiaid) < (reply.topiacreatedate || reply.topiaid)
+);
Added: trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_520__add_performance_indexes.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_520__add_performance_indexes.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/postgres/V1_0_0_520__add_performance_indexes.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,18 @@
+CREATE INDEX email_receptionDate_idx ON email(receptionDate ASC);
+CREATE INDEX email_archiveDate_idx ON email(archiveDate NULLS FIRST);
+CREATE INDEX email_mailFolder_idx ON email(mailFolder);
+CREATE INDEX email_demandStatus_idx ON email(demandStatus);
+
+CREATE INDEX email_takenBy_idx ON email(takenBy);
+CREATE INDEX email_client_idx ON email(client);
+CREATE INDEX email_etatAttente_idx ON email(etatAttente);
+CREATE INDEX email_priority_idx ON email(priority);
+CREATE INDEX email_demandType_idx ON email(demandType);
+
+CREATE INDEX demandType_fields_OWNER_idx ON demandType_fields(OWNER);
+CREATE INDEX rangeRow_range_idx ON rangeRow(range);
+CREATE INDEX history_faxToMailUser_idx ON history(faxToMailUser);
+CREATE INDEX history_fields_OWNER_idx ON history_fields(OWNER);
+
+CREATE INDEX mailfolder_readrightusers_readRightUsers_idx ON mailfolder_readrightusers(readRightUsers);
+CREATE INDEX mailfolder_readrightgroups_readRightGroups_idx ON mailfolder_readrightgroups(readRightGroups);
Added: trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_442__move_object_to_folder_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_442__move_object_to_folder_configuration.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_442__move_object_to_folder_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,66 @@
+
+-- move lock out of business model and to his own table
+alter table email drop constraint FK_970tl3l0qssnsrvvb3m1n6ivp;
+GO
+alter table email drop column lockedby;
+GO
+create table mailLock (
+ topiaId varchar(255) not null,
+ topiaVersion bigint not null,
+ topiaCreateDate datetime2,
+ lockOn varchar(255) not null,
+ lockBy varchar(255) not null,
+ primary key (topiaId)
+);
+alter table mailLock
+ add constraint UK_cebqxr5mtsd4wmm0x0nwaa5km unique (lockOn);
+alter table mailLock
+ add constraint FK_cebqxr5mtsd4wmm0x0nwaa5km
+ foreign key (lockOn)
+ references email;
+alter table mailLock
+ add constraint FK_gwxpc59s0wjg60djbk5xa4d5d
+ foreign key (lockBy)
+ references faxToMailUser;
+
+-- edi transfer for each folder
+alter table demandtype drop column editransfer;
+alter table mailfolder add editransfer bit;
+GO
+update mailfolder set editransfer = 0 where parent is null;
+
+-- reject allowed for email account
+alter table EmailAccount add rejectAllowed bit;
+GO
+update EmailAccount set rejectAllowed = 0;
+
+-- demandtype per folder
+create table demandtypes_mailfolder (
+ mailFolder varchar(255) not null,
+ demandTypes varchar(255) not null
+);
+alter table demandtypes_mailfolder
+ add constraint FK_apld4ycj71ouug7vmg5wtr1y9
+ foreign key (demandTypes)
+ references demandType;
+alter table demandtypes_mailfolder
+ add constraint FK_pmybd6fsyapv8ygtn7pjw258k
+ foreign key (mailFolder)
+ references mailFolder;
+CREATE INDEX idx_MailFolder_demandTypes ON demandtypes_mailfolder(mailFolder);
+
+-- range per folder
+create table mailfolder_ranges (
+ mailFolder varchar(255) not null,
+ ranges varchar(255) not null
+);
+alter table mailfolder_ranges
+ add constraint FK_kiolyiaeicw5he7xlima0ugbb
+ foreign key (ranges)
+ references range;
+alter table mailfolder_ranges
+ add constraint FK_h78fwd9gc92wh7vw612q48xrr
+ foreign key (mailFolder)
+ references mailFolder;
+CREATE INDEX idx_MailFolder_ranges ON mailfolder_ranges(mailFolder);
+GO
\ No newline at end of file
Added: trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_448__add_mail_folder_level_configuration.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_448__add_mail_folder_level_configuration.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_448__add_mail_folder_level_configuration.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,7 @@
+
+-- add mail folder level configuration
+alter table mailfolder add useCurrentLevelDemandType bit;
+alter table mailfolder add useCurrentLevelRange bit;
+GO
+update mailfolder set useCurrentLevelDemandType = 0;
+update mailfolder set useCurrentLevelRange = 0;
Added: trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_454__add_ldap_config.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_454__add_ldap_config.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_454__add_ldap_config.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,7 @@
+
+-- add user and group hidden configuration
+alter table FaxToMailUserGroup add hidden bit;
+alter table FaxToMailUser add hidden bit;
+GO
+update FaxToMailUserGroup set hidden = 0;
+update FaxToMailUser set hidden = 0;
Added: trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_480__remove_faxtomailusergroup_loop_association_and_add_idx.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,47 @@
+
+-- remove unused association
+ALTER TABLE faxtomailusergroup DROP constraint FK_8efs0kgau1bt0iifrn8bdbecy;
+ALTER TABLE faxtomailusergroup DROP COLUMN faxtomailusergroup;
+
+-- add column faxAccountType on emailAccount
+ALTER TABLE emailAccount add faxAccountType bit;
+GO
+update emailAccount set faxAccountType = 0;
+
+-- see http://www.sql-server-helper.com/tips/date-formats.aspx for convert
+
+-- add email_idx on attachment
+ALTER TABLE attachment ADD email_idx integer;
+GO
+UPDATE attachment SET email_idx = (
+ SELECT COUNT(topiaid) FROM attachment sub
+ WHERE sub.email = attachment.email
+ AND (CONVERT(VARCHAR(23), sub.topiacreatedate, 126) + sub.topiaid) < (CONVERT(VARCHAR(23), attachment.topiacreatedate, 126) + attachment.topiaid)
+);
+
+-- add email_idx on history
+ALTER TABLE history ADD email_idx integer;
+GO
+UPDATE history SET email_idx = (
+ SELECT COUNT(topiaid) FROM history sub
+ WHERE sub.email = history.email
+ AND (CONVERT(VARCHAR(23), sub.topiacreatedate, 126) + sub.topiaid) < (CONVERT(VARCHAR(23), history.topiacreatedate, 126) + history.topiaid)
+);
+
+-- add email_idx on rangeRow
+ALTER TABLE rangeRow ADD email_idx integer;
+GO
+UPDATE rangeRow SET email_idx = (
+ SELECT COUNT(topiaid) FROM rangeRow sub
+ WHERE sub.email = rangeRow.email
+ AND (CONVERT(VARCHAR(23), sub.topiacreatedate, 126) + sub.topiaid) < (CONVERT(VARCHAR(23), rangeRow.topiacreatedate, 126) + rangeRow.topiaid)
+);
+
+-- add email_idx on reply
+ALTER TABLE reply ADD email_idx integer;
+GO
+UPDATE reply SET email_idx = (
+ SELECT COUNT(topiaid) FROM reply sub
+ WHERE sub.email = reply.email
+ AND (CONVERT(VARCHAR(23), sub.topiacreatedate, 126) + sub.topiaid) < (CONVERT(VARCHAR(23), reply.topiacreatedate, 126) + reply.topiaid)
+);
Added: trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_520__add_performance_indexes.sql
===================================================================
--- trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_520__add_performance_indexes.sql (rev 0)
+++ trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_520__add_performance_indexes.sql 2014-08-13 12:13:19 UTC (rev 543)
@@ -0,0 +1,18 @@
+CREATE INDEX email_receptionDate_idx ON email(receptionDate ASC);
+CREATE INDEX email_archiveDate_idx ON email(archiveDate);
+CREATE INDEX email_mailFolder_idx ON email(mailFolder);
+CREATE INDEX email_demandStatus_idx ON email(demandStatus);
+
+CREATE INDEX email_takenBy_idx ON email(takenBy);
+CREATE INDEX email_client_idx ON email(client);
+CREATE INDEX email_etatAttente_idx ON email(etatAttente);
+CREATE INDEX email_priority_idx ON email(priority);
+CREATE INDEX email_demandType_idx ON email(demandType);
+
+CREATE INDEX demandType_fields_OWNER_idx ON demandType_fields(OWNER);
+CREATE INDEX rangeRow_range_idx ON rangeRow(range);
+CREATE INDEX history_faxToMailUser_idx ON history(faxToMailUser);
+CREATE INDEX history_fields_OWNER_idx ON history_fields(OWNER);
+
+CREATE INDEX mailfolder_readrightusers_readRightUsers_idx ON mailfolder_readrightusers(readRightUsers);
+CREATE INDEX mailfolder_readrightgroups_readRightGroups_idx ON mailfolder_readrightgroups(readRightGroups);
Modified: trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/migration/FlywayMigrationTest.java
===================================================================
--- trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/migration/FlywayMigrationTest.java 2014-08-13 10:16:46 UTC (rev 542)
+++ trunk/faxtomail-service/src/test/java/com/franciaflex/faxtomail/services/service/migration/FlywayMigrationTest.java 2014-08-13 12:13:19 UTC (rev 543)
@@ -73,7 +73,6 @@
hibernateH2Config.put(Environment.PASS, "");
hibernateH2Config.put(Environment.HBM2DDL_AUTO, "");
hibernateH2Config.put(Environment.URL, "jdbc:h2:file:" + databaseFile.getAbsolutePath() + "/h2data-1_0_0_rc2;MODE=MSSQLServer");
- System.out.println(databaseFile.getAbsolutePath() + "/h2data-1_0_0_rc2;");
// flyway config
hibernateH2Config.put("topia.service.migration", FaxtomailFlywayMigrationService.class.getName());
@@ -90,7 +89,7 @@
public void testFlywayMigrations() {
// recupere le nombre de fichier de migration
- List<File> migrationFiles = FileUtil.find(new File("src/main/resources/db/migration"), ".*\\.sql", false);
+ List<File> migrationFiles = FileUtil.find(new File("src/main/resources/db/migration/h2"), ".*\\.sql", false);
// recupere dans la base le nombre de migration qui sont passée
Integer migrationCount = getServiceContext().getPersistenceContext().getSqlSupport().findSingleResult(new TopiaSqlQuery<Integer>() {
1
0
13 Aug '14
Author: kmorin
Date: 2014-08-13 12:16:46 +0200 (Wed, 13 Aug 2014)
New Revision: 542
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/542
Log:
- ordre d'affichage des dossiers
- am?\195?\169lioration des actions
- correction lazy
Removed:
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/
Modified:
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationServiceImpl.java
trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractFaxToMailAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/EditAttachmentAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GroupAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java
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/demande/DemandeListUIHandler.java
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/print/AttachmentToPrintChooserUIHandler.java
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/SearchUIHandler.java
trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationServiceImpl.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationServiceImpl.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/ConfigurationServiceImpl.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -42,6 +42,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.hibernate.Hibernate;
import org.nuiton.topia.persistence.TopiaEntities;
import org.nuiton.util.beans.Binder;
import org.nuiton.util.beans.BinderFactory;
@@ -106,7 +107,7 @@
if (config == null) {
config = new ConfigurationImpl();
}
- config.sizeInvalidFormDisabledActions();
+ Hibernate.initialize(config.getInvalidFormDisabledActions());
return config;
}
Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java
===================================================================
--- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailServiceImpl.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -113,6 +113,11 @@
return email;
}
+ protected Email getEmailById(String id, String fetch, String... otherFetches) {
+ Email email = getPersistenceContext().getEmailDao().forTopiaIdEquals(id).addAllFetches(fetch, otherFetches).findUnique();
+ return email;
+ }
+
@Override
public Email getFullEmailById(String id) {
Email email = getPersistenceContext().getEmailDao()
@@ -250,7 +255,7 @@
handleEdiTransmission(email, historyDao, fieldSet);
}
- History history;
+ History history = null;
if (fieldSet.contains(Email.PROPERTY_ARCHIVE_DATE)) {
history = historyDao.create(History.PROPERTY_TYPE, HistoryType.ARCHIVED,
History.PROPERTY_FAX_TO_MAIL_USER, user,
@@ -268,12 +273,17 @@
fieldSet.add(Email.PROPERTY_TAKEN_BY);
}
- history = historyDao.create(History.PROPERTY_TYPE, email.isHistoryEmpty() ? HistoryType.CREATION : HistoryType.MODIFICATION,
- History.PROPERTY_FAX_TO_MAIL_USER, user,
- History.PROPERTY_FIELDS, fieldSet,
- History.PROPERTY_MODIFICATION_DATE, now);
+ boolean historyEmpty = email.isHistoryEmpty();
+ if (historyEmpty || !fieldSet.isEmpty()) {
+ history = historyDao.create(History.PROPERTY_TYPE, historyEmpty ? HistoryType.CREATION : HistoryType.MODIFICATION,
+ History.PROPERTY_FAX_TO_MAIL_USER, user,
+ History.PROPERTY_FIELDS, fieldSet,
+ History.PROPERTY_MODIFICATION_DATE, now);
+ }
}
- email.addHistory(history);
+ if (history != null) {
+ email.addHistory(history);
+ }
Email result = dao.update(email);
getPersistenceContext().commit();
@@ -603,7 +613,9 @@
@Override
public Email addToHistory(String emailId, HistoryType type, FaxToMailUser user, Date date, String... fields) {
EmailTopiaDao emailDao = getPersistenceContext().getEmailDao();
- Email email = getEmailById(emailId);
+ Email email = getEmailById(emailId,
+ Email.PROPERTY_HISTORY + "." + History.PROPERTY_FAX_TO_MAIL_USER,
+ Email.PROPERTY_HISTORY + "." + History.PROPERTY_FIELDS);
HistoryTopiaDao historyDao = getPersistenceContext().getHistoryDao();
History history = historyDao.create(History.PROPERTY_TYPE, type,
@@ -864,8 +876,6 @@
/**
* Envoi une réponse et retourne l'email.
*
- * FIXME echatellier 20140804 : pourquoi retourner l'email ? la réponse ne devrait absolument pas modifier l'email
- *
* @param from from
* @param to to
* @param cc cc
@@ -885,7 +895,10 @@
String content, Collection<AttachmentFile> attachments,
String originalEmailId, FaxToMailUser user) throws EmailException, MessagingException, IOException {
- Email email = getEmailById(originalEmailId);
+ Email email = getEmailById(originalEmailId,
+ Email.PROPERTY_HISTORY + "." + History.PROPERTY_FAX_TO_MAIL_USER,
+ Email.PROPERTY_HISTORY + "." + History.PROPERTY_FIELDS,
+ Email.PROPERTY_REPLIES);
final String smtpUser = getApplicationConfig().getSmtpUser();
final String password = getApplicationConfig().getSmtpPassword();
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractFaxToMailAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractFaxToMailAction.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractFaxToMailAction.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -84,38 +84,4 @@
progressionModel.adaptTotal(total);
}
}
-
- protected boolean askAdminPassword(String askMessage,
- String askMessageTitle,
- String errorMessage,
- String errorMessageTitle) {
-
- Component container = getContext().getActionUI();
-
- String answer;
- boolean result;
- do {
- answer = JOptionPane.showInputDialog(container,
- askMessage,
- askMessageTitle,
- JOptionPane.WARNING_MESSAGE);
-// if (answer != null) {
-// String cryptedAnswer = StringUtil.encodeMD5(answer);
-// String correctAnswer = getConfig().getAdminPassword();
-// result = StringUtils.equals(cryptedAnswer, correctAnswer);
-//
-// if (!result) {
-// JOptionPane.showMessageDialog(container,
-// errorMessage,
-// errorMessageTitle,
-// JOptionPane.ERROR_MESSAGE);
-// }
-//
-// } else {
- result = false;
-// }
-
- } while (!result && answer != null);
- return result;
- }
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/EditAttachmentAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/EditAttachmentAction.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/EditAttachmentAction.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -69,22 +69,12 @@
MainUI mainUI = getContext().getMainUI();
PDFEditorUI dialogContent = new PDFEditorUI(getUI());
- /*boolean editedNull = attachment.getEditedFileName() == null;
- AttachmentFile attachmentFile = editedNull ? attachment.getOriginalFile() : attachment.getEditedFile();
- if (attachmentFile == null) {
- attachmentFile = getContext().getEmailService().getAttachmentFile(attachment.getTopiaId(), editedNull);
- }
-
- if (editedNull) {
- attachment.setOriginalFile(attachmentFile);
- } else {
- attachment.setEditedFile(attachmentFile);
- }*/
PDFEditorUIModel pdfEditorUIModel = dialogContent.getModel();
pdfEditorUIModel.fromEntity(attachment);
pdfEditorUIModel.setDemand(getContext().getCurrentEmail());
getHandler().openModalFrame(dialogContent, attachment.getOriginalFileName(), mainUI.getSize());
+ //TODO kmorin 20140813 avant, c'était bloquant vu que c'etait un dialog
pdfEditorUIModel.toEntity(attachment);
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GroupAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GroupAction.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GroupAction.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -83,9 +83,12 @@
Email email = emailService.groupEmails(currentEmail.getTopiaId(), selectedEmail.getTopiaId(), currentUser);
currentEmail.fromEntity(email);
currentEmail.setGroupedDemandes(email.getEmailGroup());
+ }
+ @Override
+ public void postSuccessAction() {
+ super.postSuccessAction();
handler.showInformationMessage(t("faxtomail.demande.group.successful"));
-
handler.closeFrame();
}
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -112,10 +112,10 @@
}
Email email = serviceContext.getEmailService().addToHistory(demandeUIModel.getTopiaId(),
- HistoryType.PRINTING,
- getContext().getCurrentUser(),
- new Date(),
- printedFiles.toArray(new String[printedFiles.size()]));
+ HistoryType.PRINTING,
+ getContext().getCurrentUser(),
+ new Date(),
+ printedFiles.toArray(new String[printedFiles.size()]));
demandeUIModel.setHistory(email.getHistory());
}
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -46,8 +46,6 @@
/**
* To show demande screen.
- * TODO kmorin 20140811 gérer le cas où la demande a changé de dossier entre le moment où on a affiché la liste
- * et le moment où on l'ouvre
*
* @author kmorin - morin(a)codelutin.com
*/
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-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/TransmitAction.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -81,8 +81,7 @@
} else {
DemandesUI parentUI = (DemandesUI) getUI().getContextValue(JAXXContext.class, JAXXUtil.PARENT);
DemandeUI demandeUI = (DemandeUI) parentUI.getDemandsTabPane().getSelectedComponent();
- getContext().getActionEngine().runInternalAction(demandeUI.getHandler(),
- SaveDemandeAndExitAction.class);
+ getActionEngine().runInternalAction(demandeUI.getHandler(), SaveDemandeAction.class);
}
}
}
@@ -90,6 +89,8 @@
@Override
public void postSuccessAction() {
super.postSuccessAction();
- getHandler().closeFrame();
+ MailFolderChooserUIHandler handler = getHandler();
+ getActionEngine().runInternalAction(handler, GoToPreviousScreenAction.class);
+ handler.closeFrame();
}
}
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-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -357,7 +357,6 @@
public void updateResultPerPage(ItemEvent event) {
if (event.getStateChange() == ItemEvent.SELECTED) {
- //FIXME echatellier 20140801 this produce transasction exception
int resultPerPage = (Integer)event.getItem();
getModel().setResultPerPage(resultPerPage);
getConfig().setResultPerPage(resultPerPage);
@@ -573,7 +572,7 @@
attachmentToPrints,
take,
true);
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runAction(action);
}
public void reply() {
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-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandesUIHandler.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -331,7 +331,7 @@
closeButtonPopups();
DemandeUI demandeUI = (DemandeUI) getTabPanel().getSelectedComponent();
SaveDemandeAndExitAction action = new SaveDemandeAndExitAction(demandeUI.getHandler());
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runAction(action);
}
public void transmitDemande() {
@@ -342,13 +342,13 @@
MailFolderChooserUIModel model = new MailFolderChooserUIModel();
model.setDemandeUIModels(demandes);
MailFolderChooserUI dialogContent = new MailFolderChooserUI(ui, model);
+
SaveAndOpenDialogAction action = new SaveAndOpenDialogAction(demandeUI.getHandler(),
dialogContent,
t("faxtomail.chooseMailFolder.title"),
new Dimension(350, 500),
true);
-
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runAction(action);
}
public void print() {
@@ -368,15 +368,14 @@
t("faxtomail.chooseAttachmentToPrint.title"),
new Dimension(350, 500),
take);
-
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runAction(action);
}
public void archive() {
closeButtonPopups();
DemandeUI demandeUI = (DemandeUI) getTabPanel().getSelectedComponent();
ArchiveAction action = new ArchiveAction(demandeUI.getHandler());
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runAction(action);
}
public void reply() {
@@ -401,8 +400,7 @@
t("faxtomail.reply.title", currentDemand.getTitle()),
new Dimension(800, 600),
true);
-
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runAction(action);
}
public void group() {
@@ -415,8 +413,7 @@
t("faxtomail.searchToGroup.title", demandeUI.getModel().getTitle()),
getContext().getMainUI().getSize(),
false);
-
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runAction(action);
}
}
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-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/demandgroup/DemandGroupUIHandler.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -155,7 +155,7 @@
closeEditor();
OpenGroupedDemandAction openAction = new OpenGroupedDemandAction(this, demande);
- getContext().getActionFactory().createUIAction(null, openAction).actionPerformed(null);
+ getContext().getActionEngine().runAction(openAction);
}
protected class DemandGroupItemRenderer extends DemandGroupItem
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-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -156,7 +156,7 @@
attachmentToPrints,
false,
false);
- getContext().getActionFactory().createUIAction(null, action).actionPerformed(null);
+ getContext().getActionEngine().runActionAndWait(action);
showInformationMessage("faxtomail.print.success.message");
closeFrame();
}
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-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchToGroupUIHandler.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -190,16 +190,7 @@
});
if (getContext().getSearch() != null) {
- try {
- SearchToGroupAction searchAction = getContext().getActionFactory().createLogicAction(SearchToGroupUIHandler.this, SearchToGroupAction.class);
- searchAction.doAction();
-
- } catch (Exception e) {
- if (log.isErrorEnabled()) {
- log.error("error while searching", e);
- }
- getContext().getErrorHelper().showErrorDialog(t("faxtomail.search.action.error"));
- }
+ runSearchAction();
}
dataTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@@ -269,9 +260,8 @@
protected void runSearchAction() {
try {
-
SearchToGroupAction searchAction = new SearchToGroupAction(this);
- getContext().getActionFactory().createUIAction(null, searchAction).actionPerformed(null);
+ getContext().getActionEngine().runAction(searchAction);
} catch (Exception e) {
if (log.isErrorEnabled()) {
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-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -174,16 +174,7 @@
});
if (getContext().getSearch() != null) {
- try {
- SearchAction searchAction = getContext().getActionFactory().createLogicAction(this, SearchAction.class);
- searchAction.doAction();
-
- } catch (Exception e) {
- if (log.isErrorEnabled()) {
- log.error("error while searching", e);
- }
- getContext().getErrorHelper().showErrorDialog(t("faxtomail.search.action.error"));
- }
+ runSearchAction();
}
// int combo box for result per page
@@ -228,7 +219,7 @@
protected void runSearchAction() {
try {
SearchAction searchAction = new SearchAction(this);
- getContext().getActionFactory().createUIAction(null, searchAction).actionPerformed(null);
+ getContext().getActionEngine().runAction(searchAction);
} catch (Exception e) {
if (log.isErrorEnabled()) {
Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java
===================================================================
--- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java 2014-08-13 08:45:39 UTC (rev 541)
+++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java 2014-08-13 10:16:46 UTC (rev 542)
@@ -67,6 +67,8 @@
import com.franciaflex.faxtomail.persistence.entities.DemandType;
import com.franciaflex.faxtomail.persistence.entities.MailField;
import com.franciaflex.faxtomail.services.FaxToMailServiceContext;
+import com.google.common.base.Function;
+import com.google.common.collect.Ordering;
import jaxx.runtime.JAXXObject;
import jaxx.runtime.JAXXUtil;
@@ -129,7 +131,14 @@
List<MailFolder> foldersToExpand = context.getExpandedFolders();
Map<MailFolder, FolderTreeNode> nodesByFolder = new HashMap<MailFolder, FolderTreeNode>();
- for (MailFolder folder : folders) {
+ List<MailFolder> orderedFolders = new ArrayList<MailFolder>(folders);
+ Collections.sort(orderedFolders, Ordering.natural().onResultOf(new Function<MailFolder, Comparable>() {
+ @Override
+ public Comparable apply(MailFolder folder) {
+ return folder.getName();
+ }
+ }));
+ for (MailFolder folder : orderedFolders) {
nodesByFolder.putAll(FaxToMailUIUtil.createFolderTree(root, folder));
FolderTreeNode node = nodesByFolder.get(folder);
1
0
r541 - trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content
by echatellier@users.forge.codelutin.com 13 Aug '14
by echatellier@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: echatellier
Date: 2014-08-13 10:45:39 +0200 (Wed, 13 Aug 2014)
New Revision: 541
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/541
Log:
Remove useless module on login page
Modified:
trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp
Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp 2014-08-13 08:44:29 UTC (rev 540)
+++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/login-input.jsp 2014-08-13 08:45:39 UTC (rev 541)
@@ -30,7 +30,7 @@
</head>
<body>
- <div id="main-container" class="container" ng-app="ConfigurationModule">
+ <div id="main-container" class="container">
<h1 class="page-header">Connexion</h1>
<s:form id="main_form" action="login" method="post" role="form" class="form-horizontal">
1
0
r540 - trunk/faxtomail-ui-web/src/main/webapp/js
by echatellier@users.forge.codelutin.com 13 Aug '14
by echatellier@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: echatellier
Date: 2014-08-13 10:44:29 +0200 (Wed, 13 Aug 2014)
New Revision: 540
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/540
Log:
Remove unused chosen lib
Modified:
trunk/faxtomail-ui-web/src/main/webapp/js/user-folder.js
Modified: trunk/faxtomail-ui-web/src/main/webapp/js/user-folder.js
===================================================================
--- trunk/faxtomail-ui-web/src/main/webapp/js/user-folder.js 2014-08-13 08:42:06 UTC (rev 539)
+++ trunk/faxtomail-ui-web/src/main/webapp/js/user-folder.js 2014-08-13 08:44:29 UTC (rev 540)
@@ -22,7 +22,7 @@
* #L%
*/
-var UserFolderModule = angular.module('UserFolderModule', ['FaxToMail', 'localytics.directives', 'ui.select2.sortable']);
+var UserFolderModule = angular.module('UserFolderModule', ['FaxToMail', 'ui.select2.sortable']);
/**
* Global configuration controller.
1
0
r539 - trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job
by echatellier@users.forge.codelutin.com 13 Aug '14
by echatellier@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: echatellier
Date: 2014-08-13 10:42:06 +0200 (Wed, 13 Aug 2014)
New Revision: 539
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/539
Log:
Move log level to info to kwon that server is doing somethings
Modified:
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/ClientUpdateJob.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/EDIManagementJob.java
trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/ClientUpdateJob.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/ClientUpdateJob.java 2014-08-13 08:39:41 UTC (rev 538)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/ClientUpdateJob.java 2014-08-13 08:42:06 UTC (rev 539)
@@ -24,7 +24,6 @@
* #L%
*/
-import com.franciaflex.faxtomail.services.service.ClientServiceImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.DisallowConcurrentExecution;
@@ -56,8 +55,8 @@
persistenceContext = applicationContext.newPersistenceContext();
FaxToMailServiceContext serviceContext = applicationContext.newServiceContext(persistenceContext);
- if (log.isDebugEnabled()) {
- log.debug("Running ClientUpdateJob at " + serviceContext.getNow());
+ if (log.isInfoEnabled()) {
+ log.info("Running ClientUpdateJob at " + serviceContext.getNow());
}
ClientService clientService = serviceContext.getClientService();
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/EDIManagementJob.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/EDIManagementJob.java 2014-08-13 08:39:41 UTC (rev 538)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/EDIManagementJob.java 2014-08-13 08:42:06 UTC (rev 539)
@@ -29,7 +29,6 @@
import com.franciaflex.faxtomail.services.FaxToMailServiceContext;
import com.franciaflex.faxtomail.services.service.EmailService;
-import com.franciaflex.faxtomail.services.service.EmailServiceImpl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.DisallowConcurrentExecution;
@@ -54,8 +53,8 @@
try {
persistenceContext = applicationContext.newPersistenceContext();
FaxToMailServiceContext serviceContext = applicationContext.newServiceContext(persistenceContext);
- if (log.isDebugEnabled()) {
- log.debug("Running EDIManagementJob at " + serviceContext.getNow());
+ if (log.isInfoEnabled()) {
+ log.info("Running EDIManagementJob at " + serviceContext.getNow());
}
EmailService emailService = serviceContext.getEmailService();
Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java
===================================================================
--- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java 2014-08-13 08:39:41 UTC (rev 538)
+++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java 2014-08-13 08:42:06 UTC (rev 539)
@@ -135,8 +135,8 @@
FaxToMailServiceContext serviceContext = applicationContext.newServiceContext(persistenceContext);
config = serviceContext.getApplicationConfig();
- if (log.isDebugEnabled()) {
- log.debug("Running MailFilterJob at " + serviceContext.getNow());
+ if (log.isInfoEnabled()) {
+ log.info("Running MailFilterJob at " + serviceContext.getNow());
}
emailService = serviceContext.getEmailService();
1
0
r538 - in trunk: . faxtomail-service faxtomail-ui-swing faxtomail-ui-web
by echatellier@users.forge.codelutin.com 13 Aug '14
by echatellier@users.forge.codelutin.com 13 Aug '14
13 Aug '14
Author: echatellier
Date: 2014-08-13 10:39:41 +0200 (Wed, 13 Aug 2014)
New Revision: 538
Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/538
Log:
Fix logging
Modified:
trunk/faxtomail-service/pom.xml
trunk/faxtomail-ui-swing/pom.xml
trunk/faxtomail-ui-web/pom.xml
trunk/pom.xml
Modified: trunk/faxtomail-service/pom.xml
===================================================================
--- trunk/faxtomail-service/pom.xml 2014-08-13 08:35:54 UTC (rev 537)
+++ trunk/faxtomail-service/pom.xml 2014-08-13 08:39:41 UTC (rev 538)
@@ -151,6 +151,12 @@
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<scope>test</scope>
</dependency>
Modified: trunk/faxtomail-ui-swing/pom.xml
===================================================================
--- trunk/faxtomail-ui-swing/pom.xml 2014-08-13 08:35:54 UTC (rev 537)
+++ trunk/faxtomail-ui-swing/pom.xml 2014-08-13 08:39:41 UTC (rev 538)
@@ -190,14 +190,17 @@
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
- <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
- <scope>runtime</scope>
</dependency>
<dependency>
Modified: trunk/faxtomail-ui-web/pom.xml
===================================================================
--- trunk/faxtomail-ui-web/pom.xml 2014-08-13 08:35:54 UTC (rev 537)
+++ trunk/faxtomail-ui-web/pom.xml 2014-08-13 08:39:41 UTC (rev 538)
@@ -158,17 +158,20 @@
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
- <scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
- <scope>runtime</scope>
</dependency>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-08-13 08:35:54 UTC (rev 537)
+++ trunk/pom.xml 2014-08-13 08:39:41 UTC (rev 538)
@@ -356,6 +356,13 @@
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4jVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>${log4jVersion}</version>
<scope>runtime</scope>
1
0