Author: kmorin Date: 2014-02-14 18:28:56 +0100 (Fri, 14 Feb 2014) New Revision: 10 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/10 Log: continue Added: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java Removed: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entity/ Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/FaxToMailServiceSupport.java trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/UserService.java trunk/faxtomail-ui-swing/src/license/THIRD-PARTY.properties trunk/faxtomail-ui-swing/src/main/assembly/faxtomail-full-component.xml trunk/faxtomail-ui-swing/src/main/assembly/full-linux-i586.xml trunk/faxtomail-ui-swing/src/main/assembly/full-linux-x64.xml trunk/faxtomail-ui-swing/src/main/assembly/full-windows-i586.xml trunk/faxtomail-ui-swing/src/main/assembly/full-windows-x64.xml trunk/faxtomail-ui-swing/src/main/assembly/full/faxtomail.sh trunk/faxtomail-ui-swing/src/main/assembly/i18n.xml trunk/faxtomail-ui-swing/src/main/assembly/min/launch.sh trunk/faxtomail-ui-swing/src/main/assembly/standalone.xml trunk/faxtomail-ui-swing/src/main/filtered-resources/log4j.properties trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailActionFactory.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailScreen.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/RunFaxToMail.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractChangeScreenAction.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/AbstractMainUIFaxToMailAction.java 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/GoToPreviousScreenAction.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ReloadFaxToMailAction.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowConfigAction.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/ShowDemandeListAction.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/StartAction.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.css trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.jaxx trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.css trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.jaxx trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUIHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.jaxx 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/DemandeListUIModel.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeTableModel.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/content/demande/FolderTreeNode.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/AbstractFaxToMailBeanUIModel.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/Cancelable.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CloseableUI.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailExceptionHandler.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUI.java 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/RemoveablePropertyChangeListener.java trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/UIMessageNotifier.java trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties trunk/faxtomail-ui-swing/src/main/resources/log4j.properties trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java trunk/pom.xml Added: trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java =================================================================== --- trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java (rev 0) +++ trunk/faxtomail-persistence/src/main/java/com/franciaflex/faxtomail/persistence/entities/HistoryType.java 2014-02-14 17:28:56 UTC (rev 10) @@ -0,0 +1,11 @@ +package com.franciaflex.faxtomail.persistence.entities; + +/** + * @author Kevin Morin (Code Lutin) + * @since x.x + */ +public enum HistoryType { + + OPENING, + MODIFICATION +} Modified: trunk/faxtomail-persistence/src/main/xmi/faxtomail.zargo =================================================================== (Binary files differ) Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/FaxToMailServiceSupport.java =================================================================== --- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/FaxToMailServiceSupport.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/FaxToMailServiceSupport.java 2014-02-14 17:28:56 UTC (rev 10) @@ -28,6 +28,7 @@ import com.franciaflex.faxtomail.persistence.entities.FaxToMailTopiaPersistenceContext; import com.franciaflex.faxtomail.services.service.CompanyService; import com.franciaflex.faxtomail.services.service.ConfigurationService; +import com.franciaflex.faxtomail.services.service.EmailService; import com.franciaflex.faxtomail.services.service.FaxToMailWebApplicationContext; import com.franciaflex.faxtomail.services.service.MailFilterService; import com.franciaflex.faxtomail.services.service.MailFolderService; @@ -74,7 +75,12 @@ public MailFolderService getMailFolderService() { return newService(MailFolderService.class); } + public MailFilterService getMailFilterService() { return newService(MailFilterService.class); } + + public EmailService getEmailService() { + return newService(EmailService.class); + } } Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java =================================================================== --- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/EmailService.java 2014-02-14 17:28:56 UTC (rev 10) @@ -2,11 +2,18 @@ import com.franciaflex.faxtomail.persistence.entities.Email; import com.franciaflex.faxtomail.persistence.entities.EmailTopiaDao; +import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; +import com.franciaflex.faxtomail.persistence.entities.History; +import com.franciaflex.faxtomail.persistence.entities.HistoryTopiaDao; +import com.franciaflex.faxtomail.persistence.entities.HistoryType; import com.franciaflex.faxtomail.persistence.entities.MailFolder; import com.franciaflex.faxtomail.services.FaxToMailServiceSupport; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import java.util.ArrayList; import java.util.Collection; +import java.util.Date; import java.util.List; /** @@ -15,8 +22,30 @@ */ public class EmailService extends FaxToMailServiceSupport { + private static final Log log = LogFactory.getLog(EmailService.class); + public List<Email> getEmailForFolder(MailFolder folder) { EmailTopiaDao dao = getPersistenceContext().getEmailDao(); return new ArrayList<>(dao.forMailFolderEquals(folder).findAll()); } + + public Email addToOpeningHistory(Email email, FaxToMailUser user, Date date) { + HistoryTopiaDao historyDao = getPersistenceContext().getHistoryDao(); + History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.OPENING, + History.PROPERTY_FAX_TO_MAIL_USER, user, + History.PROPERTY_MODIFICATION_DATE, date); + + email.addHistory(history); + + if (email.getTakenBy() == null) { + email.setTakenBy(user); + } + + EmailTopiaDao emailDao = getPersistenceContext().getEmailDao(); + email = emailDao.update(email); + getPersistenceContext().commit(); + + log.info("history " + email.getHistory().size()); + return email; + } } 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/InitFaxToMailService.java 2014-02-14 17:28:56 UTC (rev 10) @@ -38,6 +38,9 @@ import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserGroup; import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserGroupTopiaDao; import com.franciaflex.faxtomail.persistence.entities.FaxToMailUserTopiaDao; +import com.franciaflex.faxtomail.persistence.entities.History; +import com.franciaflex.faxtomail.persistence.entities.HistoryTopiaDao; +import com.franciaflex.faxtomail.persistence.entities.HistoryType; import com.franciaflex.faxtomail.persistence.entities.MailFolder; import com.franciaflex.faxtomail.persistence.entities.MailFolderTopiaDao; import com.franciaflex.faxtomail.persistence.entities.Priority; @@ -151,94 +154,152 @@ rangeDao.create(Range.PROPERTY_LABEL, "Accessoires") ); + FaxToMailUserTopiaDao userDao = getPersistenceContext().getFaxToMailUserDao(); + FaxToMailUser marc = userDao.create(FaxToMailUser.PROPERTY_NAME, "Marc Lefebvre", FaxToMailUser.PROPERTY_LOGIN, "mlefebvre"); + FaxToMailUser cyril = userDao.create(FaxToMailUser.PROPERTY_NAME, "Cyril Baillet", FaxToMailUser.PROPERTY_LOGIN, "cbaillet"); + FaxToMailUser frederic = userDao.create(FaxToMailUser.PROPERTY_NAME, "Frédéric Viala", FaxToMailUser.PROPERTY_LOGIN, "fviala"); + FaxToMailUser claire = userDao.create(FaxToMailUser.PROPERTY_NAME, "Claire Marquis", FaxToMailUser.PROPERTY_LOGIN, "cmarquis"); + FaxToMailUser agathe = userDao.create(FaxToMailUser.PROPERTY_NAME, "Agathe Borde", FaxToMailUser.PROPERTY_LOGIN, "aborde"); + FaxToMailUser jeanne = userDao.create(FaxToMailUser.PROPERTY_NAME, "Jeanne Bourgoin", FaxToMailUser.PROPERTY_LOGIN, "jbourgoin"); + MailFolderTopiaDao folderDao = getPersistenceContext().getMailFolderDao(); List<MailFolder> folders = new ArrayList<>(); Random random = new Random(); EmailTopiaDao emailDao = getPersistenceContext().getEmailDao(); + HistoryTopiaDao historyDao = getPersistenceContext().getHistoryDao(); - MailFolder cyril = folderDao.create(MailFolder.PROPERTY_NAME, "Cyril"); + MailFolder cyrilFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Cyril"); int r = random.nextInt(10) + 5; for (int i = 0 ; i < r ; i++) { - emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", + History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.MODIFICATION, + History.PROPERTY_MODIFICATION_DATE, new Date()); + + Email email = emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", Email.PROPERTY_OBJECT, RandomStringUtils.randomAlphabetic(10), Email.PROPERTY_RECEPTION_DATE, new Date(), - Email.PROPERTY_MAIL_FOLDER, cyril, + Email.PROPERTY_MAIL_FOLDER, cyrilFolder, Email.PROPERTY_DEMAND_TYPE, types.get(random.nextInt(types.size())), Email.PROPERTY_DEMAND_STATUS, statuses.get(random.nextInt(statuses.size())), Email.PROPERTY_PRIORITY, priorities.get(random.nextInt(priorities.size())), - Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size())))); + Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size()))), + Email.PROPERTY_HISTORY, Lists.newArrayList(history)); + + + if (random.nextBoolean()) { + getEmailService().addToOpeningHistory(email, cyril, new Date()); + } } - MailFolder claire = folderDao.create(MailFolder.PROPERTY_NAME, "Claire"); + MailFolder claireFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Claire"); r = random.nextInt(10) + 5; for (int i = 0 ; i < r ; i++) { - emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", + History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.MODIFICATION, + History.PROPERTY_MODIFICATION_DATE, new Date()); + + Email email = emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", Email.PROPERTY_OBJECT, RandomStringUtils.randomAlphabetic(10), Email.PROPERTY_RECEPTION_DATE, new Date(), - Email.PROPERTY_MAIL_FOLDER, claire, + Email.PROPERTY_MAIL_FOLDER, claireFolder, Email.PROPERTY_DEMAND_TYPE, types.get(random.nextInt(types.size())), Email.PROPERTY_DEMAND_STATUS, statuses.get(random.nextInt(statuses.size())), Email.PROPERTY_PRIORITY, priorities.get(random.nextInt(priorities.size())), - Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size())))); + Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size()))), + Email.PROPERTY_HISTORY, Lists.newArrayList(history)); + + if (random.nextBoolean()) { + getEmailService().addToOpeningHistory(email, claire, new Date()); + } } - MailFolder agathe = folderDao.create(MailFolder.PROPERTY_NAME, "Agathe"); + MailFolder agatheFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Agathe"); r = random.nextInt(10) + 5; for (int i = 0 ; i < r ; i++) { - emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", + History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.MODIFICATION, + History.PROPERTY_MODIFICATION_DATE, new Date()); + + Email email = emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", Email.PROPERTY_OBJECT, RandomStringUtils.randomAlphabetic(10), Email.PROPERTY_RECEPTION_DATE, new Date(), - Email.PROPERTY_MAIL_FOLDER, agathe, + Email.PROPERTY_MAIL_FOLDER, agatheFolder, Email.PROPERTY_DEMAND_TYPE, types.get(random.nextInt(types.size())), Email.PROPERTY_DEMAND_STATUS, statuses.get(random.nextInt(statuses.size())), Email.PROPERTY_PRIORITY, priorities.get(random.nextInt(priorities.size())), - Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size())))); + Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size()))), + Email.PROPERTY_HISTORY, Lists.newArrayList(history)); + + if (random.nextBoolean()) { + getEmailService().addToOpeningHistory(email, agathe, new Date()); + } } folders.add(folderDao.create(MailFolder.PROPERTY_NAME, "Chargés de clientèle", - MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(cyril, claire, agathe))); + MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(cyrilFolder, claireFolder, agatheFolder))); - MailFolder marc = folderDao.create(MailFolder.PROPERTY_NAME, "Marc"); + MailFolder marcFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Marc"); r = random.nextInt(10) + 5; for (int i = 0 ; i < r ; i++) { - emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", + History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.MODIFICATION, + History.PROPERTY_MODIFICATION_DATE, new Date()); + + Email email = emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", Email.PROPERTY_OBJECT, RandomStringUtils.randomAlphabetic(10), Email.PROPERTY_RECEPTION_DATE, new Date(), - Email.PROPERTY_MAIL_FOLDER, marc, + Email.PROPERTY_MAIL_FOLDER, marcFolder, Email.PROPERTY_DEMAND_TYPE, types.get(random.nextInt(types.size())), Email.PROPERTY_DEMAND_STATUS, statuses.get(random.nextInt(statuses.size())), Email.PROPERTY_PRIORITY, priorities.get(random.nextInt(priorities.size())), - Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size())))); + Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size()))), + Email.PROPERTY_HISTORY, Lists.newArrayList(history)); + + if (random.nextBoolean()) { + getEmailService().addToOpeningHistory(email, marc, new Date()); + } } - MailFolder frederic = folderDao.create(MailFolder.PROPERTY_NAME, "Frédéric"); + MailFolder fredericFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Frédéric"); r = random.nextInt(10) + 5; for (int i = 0 ; i < r ; i++) { - emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", + History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.MODIFICATION, + History.PROPERTY_MODIFICATION_DATE, new Date()); + + Email email = emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", Email.PROPERTY_OBJECT, RandomStringUtils.randomAlphabetic(10), Email.PROPERTY_RECEPTION_DATE, new Date(), - Email.PROPERTY_MAIL_FOLDER, frederic, + Email.PROPERTY_MAIL_FOLDER, fredericFolder, Email.PROPERTY_DEMAND_TYPE, types.get(random.nextInt(types.size())), Email.PROPERTY_DEMAND_STATUS, statuses.get(random.nextInt(statuses.size())), Email.PROPERTY_PRIORITY, priorities.get(random.nextInt(priorities.size())), - Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size())))); + Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size()))), + Email.PROPERTY_HISTORY, Lists.newArrayList(history)); + + if (random.nextBoolean()) { + getEmailService().addToOpeningHistory(email, frederic, new Date()); + } } - MailFolder jeanne = folderDao.create(MailFolder.PROPERTY_NAME, "Jeanne"); + MailFolder jeanneFolder = folderDao.create(MailFolder.PROPERTY_NAME, "Jeanne"); r = random.nextInt(10) + 5; for (int i = 0 ; i < r ; i++) { - emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", + History history = historyDao.create(History.PROPERTY_TYPE, HistoryType.MODIFICATION, + History.PROPERTY_MODIFICATION_DATE, new Date()); + + Email email = emailDao.create(Email.PROPERTY_SENDER_EMAIL_ADDRESS, RandomStringUtils.randomAlphabetic(8) + "@" + RandomStringUtils.randomAlphabetic(5) + ".fr", Email.PROPERTY_OBJECT, RandomStringUtils.randomAlphabetic(10), Email.PROPERTY_RECEPTION_DATE, new Date(), - Email.PROPERTY_MAIL_FOLDER, jeanne, + Email.PROPERTY_MAIL_FOLDER, jeanneFolder, Email.PROPERTY_DEMAND_TYPE, types.get(random.nextInt(types.size())), Email.PROPERTY_DEMAND_STATUS, statuses.get(random.nextInt(statuses.size())), Email.PROPERTY_PRIORITY, priorities.get(random.nextInt(priorities.size())), - Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size())))); + Email.PROPERTY_RANGE, Lists.newArrayList(ranges.get(random.nextInt(ranges.size()))), + Email.PROPERTY_HISTORY, Lists.newArrayList(history)); + + if (random.nextBoolean()) { + getEmailService().addToOpeningHistory(email, jeanne, new Date()); + } } folders.add(folderDao.create(MailFolder.PROPERTY_NAME, "SAV", - MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(marc, frederic, jeanne))); + MailFolder.PROPERTY_CHILDREN, Lists.newArrayList(marcFolder, fredericFolder, jeanneFolder))); // companies CompanyTopiaDao companyTopiaDao = getPersistenceContext().getCompanyDao(); Modified: trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/UserService.java =================================================================== --- trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/UserService.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-service/src/main/java/com/franciaflex/faxtomail/services/service/UserService.java 2014-02-14 17:28:56 UTC (rev 10) @@ -20,6 +20,12 @@ return new ArrayList<>(dao.findAll()); } + public FaxToMailUser getUserByLogin(String login) { + FaxToMailUserTopiaDao dao = getPersistenceContext().getFaxToMailUserDao(); + FaxToMailUser user = dao.forLoginEquals(login).findUnique(); + return user; + } + public List<FaxToMailUserGroup> getAllUserGroups() { FaxToMailUserGroupTopiaDao dao = getPersistenceContext().getFaxToMailUserGroupDao(); return new ArrayList<>(dao.findAll()); Modified: trunk/faxtomail-ui-swing/src/license/THIRD-PARTY.properties =================================================================== --- trunk/faxtomail-ui-swing/src/license/THIRD-PARTY.properties 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/license/THIRD-PARTY.properties 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +### +# #%L +# FaxToMail :: UI +# %% +# Copyright (C) 2014 Franciaflex +# %% +# 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% +### # Generated by org.codehaus.mojo.license.AddThirdPartyMojo #------------------------------------------------------------------------------- # Already used licenses in project : Modified: trunk/faxtomail-ui-swing/src/main/assembly/faxtomail-full-component.xml =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/faxtomail-full-component.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/faxtomail-full-component.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- #%L - Tutti :: UI - $Id: tutti-full-component.xml 1460 2013-12-10 18:52:55Z tchemit $ - $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/assem... $ + FaxToMail :: UI %% - Copyright (C) 2012 Ifremer + Copyright (C) 2014 Franciaflex %% 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 + 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, @@ -17,12 +15,13 @@ 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 + 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% --> + <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Modified: trunk/faxtomail-ui-swing/src/main/assembly/full/faxtomail.sh =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/full/faxtomail.sh 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/full/faxtomail.sh 2014-02-14 17:28:56 UTC (rev 10) @@ -1,7 +1,29 @@ #!/bin/bash +### +# #%L +# FaxToMail :: UI +# %% +# Copyright (C) 2014 Franciaflex +# %% +# 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% +### + export FAXTOMAIL_BASEDIR=$(pwd) -export FAXTOMAIL_HOME=$FAXTOMAIL_BASEDIR/tutti +export FAXTOMAIL_HOME=$FAXTOMAIL_BASEDIR/faxtomail export JAVA_HOME=$FAXTOMAIL_BASEDIR/jre export JAVA_COMMAND=$JAVA_HOME/bin/java export FAXTOMAIL_LOG_FILE=$FAXTOMAIL_BASEDIR/data/faxtomail-${project.version}.log Modified: trunk/faxtomail-ui-swing/src/main/assembly/full-linux-i586.xml =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/full-linux-i586.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/full-linux-i586.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- #%L - Tutti :: UI - $Id: full-linux-i586.xml 248 2013-01-28 11:22:28Z tchemit $ - $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/assem... $ + FaxToMail :: UI %% - Copyright (C) 2012 Ifremer + Copyright (C) 2014 Franciaflex %% 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 + 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, @@ -17,12 +15,13 @@ 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 + 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% --> + <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Modified: trunk/faxtomail-ui-swing/src/main/assembly/full-linux-x64.xml =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/full-linux-x64.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/full-linux-x64.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- #%L - Tutti :: UI - $Id: full-linux-x64.xml 248 2013-01-28 11:22:28Z tchemit $ - $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/assem... $ + FaxToMail :: UI %% - Copyright (C) 2012 Ifremer + Copyright (C) 2014 Franciaflex %% 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 + 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, @@ -17,12 +15,13 @@ 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 + 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% --> + <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Modified: trunk/faxtomail-ui-swing/src/main/assembly/full-windows-i586.xml =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/full-windows-i586.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/full-windows-i586.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- #%L - Tutti :: UI - $Id: full-windows-i586.xml 248 2013-01-28 11:22:28Z tchemit $ - $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/assem... $ + FaxToMail :: UI %% - Copyright (C) 2012 Ifremer + Copyright (C) 2014 Franciaflex %% 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 + 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, @@ -17,12 +15,13 @@ 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 + 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% --> + <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Modified: trunk/faxtomail-ui-swing/src/main/assembly/full-windows-x64.xml =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/full-windows-x64.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/full-windows-x64.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- #%L - Tutti :: UI - $Id: full-windows-x64.xml 248 2013-01-28 11:22:28Z tchemit $ - $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/assem... $ + FaxToMail :: UI %% - Copyright (C) 2012 Ifremer + Copyright (C) 2014 Franciaflex %% 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 + 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, @@ -17,12 +15,13 @@ 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 + 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% --> + <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Modified: trunk/faxtomail-ui-swing/src/main/assembly/i18n.xml =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/i18n.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/i18n.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -1,14 +1,12 @@ <!-- #%L - Tutti :: UI - $Id: i18n.xml 582 2013-03-12 09:33:46Z tchemit $ - $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/assem... $ + FaxToMail :: UI %% - Copyright (C) 2012 - 2013 Ifremer + Copyright (C) 2014 Franciaflex %% 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 + 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, @@ -16,7 +14,7 @@ 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 + 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% @@ -37,8 +35,8 @@ <directory>target/classes/META-INF</directory> <outputDirectory/> <includes> - <include>tutti-i18n*.properties</include> - <include>tutti-i18n*.csv</include> + <include>faxtomail-i18n*.properties</include> + <include>faxtomail-i18n*.csv</include> </includes> </fileSet> Modified: trunk/faxtomail-ui-swing/src/main/assembly/min/launch.sh =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/min/launch.sh 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/min/launch.sh 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ #!/bin/bash +### +# #%L +# FaxToMail :: UI +# %% +# Copyright (C) 2014 Franciaflex +# %% +# 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% +### + MEMORY="-Xmx1024M -XX:MaxPermSize=128M" #FAXTOMAIL_JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000" @@ -9,7 +31,7 @@ #echo "java command: $JAVA_COMMAND" -$JAVA_COMMAND $MEMORY $FAXTOMAIL_JVM_OPTS -Dtutti.log.file=$FAXTOMAIL_LOG_FILE -jar ${project.build.finalName}.${project.packaging} $* +$JAVA_COMMAND $MEMORY $FAXTOMAIL_JVM_OPTS -Dfaxtomail.log.file=$FAXTOMAIL_LOG_FILE -jar ${project.build.finalName}.${project.packaging} $* exitcode=$? echo "Stop FaxToMail with exitcode: $exitcode" exit $exitcode Modified: trunk/faxtomail-ui-swing/src/main/assembly/standalone.xml =================================================================== --- trunk/faxtomail-ui-swing/src/main/assembly/standalone.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/assembly/standalone.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -1,15 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- #%L - Tutti :: UI - $Id: standalone.xml 399 2013-02-11 17:33:57Z tchemit $ - $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/assem... $ + FaxToMail :: UI %% - Copyright (C) 2012 Ifremer + Copyright (C) 2014 Franciaflex %% 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 + 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, @@ -17,12 +15,13 @@ 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 + 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% --> + <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Modified: trunk/faxtomail-ui-swing/src/main/filtered-resources/log4j.properties =================================================================== --- trunk/faxtomail-ui-swing/src/main/filtered-resources/log4j.properties 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/filtered-resources/log4j.properties 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +### +# #%L +# FaxToMail :: UI +# %% +# Copyright (C) 2014 Franciaflex +# %% +# 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% +### # Global logging configuration log4j.rootLogger=ERROR, stdout, file Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailActionFactory.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailActionFactory.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailActionFactory.java 2014-02-14 17:28:56 UTC (rev 10) @@ -2,15 +2,13 @@ /* * #%L - * Tutti :: UI - * $Id: TuttiActionFactory.java 1566 2014-02-04 08:31:02Z tchemit $ - * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/java/... $ + * FaxToMail :: UI * %% - * Copyright (C) 2012 - 2013 Ifremer + * Copyright (C) 2014 Franciaflex * %% * 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 + * 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, @@ -18,7 +16,7 @@ * 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 + * 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% Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailScreen.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailScreen.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailScreen.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ + /** * Enumeration of any internal screen of application. * 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/FaxToMailUIContext.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,10 +1,34 @@ package com.franciaflex.faxtomail.ui.swing; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.FaxToMailConfiguration; import com.franciaflex.faxtomail.persistence.entities.Company; import com.franciaflex.faxtomail.persistence.entities.Email; import com.franciaflex.faxtomail.persistence.entities.FaxToMailTopiaApplicationContext; import com.franciaflex.faxtomail.persistence.entities.FaxToMailTopiaPersistenceContext; +import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; +import com.franciaflex.faxtomail.persistence.entities.MailFolder; import com.franciaflex.faxtomail.services.DecoratorService; import com.franciaflex.faxtomail.services.FaxToMailServiceContext; import com.franciaflex.faxtomail.persistence.RessourceClassLoader; @@ -13,6 +37,7 @@ import com.franciaflex.faxtomail.services.service.InitFaxToMailService; import com.franciaflex.faxtomail.services.service.MailFolderService; import com.franciaflex.faxtomail.services.service.ReferentielService; +import com.franciaflex.faxtomail.services.service.UserService; import com.franciaflex.faxtomail.ui.swing.content.MainUI; import com.franciaflex.faxtomail.ui.swing.util.UIMessageNotifier; import com.google.common.base.Preconditions; @@ -41,14 +66,19 @@ import org.nuiton.util.converter.ConverterUtil; import javax.swing.*; +import javax.swing.event.RowSorterEvent; +import javax.swing.tree.TreePath; import java.awt.*; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.io.Closeable; import java.io.File; +import java.util.ArrayList; +import java.util.Enumeration; import java.util.Locale; import java.util.Map; import java.util.Set; +import java.util.List; import static org.nuiton.i18n.I18n.t; @@ -181,8 +211,12 @@ protected Company currentCompany; + protected FaxToMailUser currentUser; + protected Email currentEmail; + protected List<MailFolder> expandedFolders = new ArrayList<MailFolder>(); + public static FaxToMailUIContext newContext(FaxToMailConfiguration config) { Preconditions.checkNotNull(config); Preconditions.checkState(applicationContext == null, @@ -405,6 +439,9 @@ Company franciaflex = getCompanyService().getCompanyByName("Franciaflex"); setCurrentCompany(franciaflex); + FaxToMailUser currentUser = getUserService().getUserByLogin("mlefebvre"); + setCurrentUser(currentUser); + // //--------------------------------------------------------------------// // // init action UI // //--------------------------------------------------------------------// @@ -480,6 +517,10 @@ return serviceContext.newService(CompanyService.class); } + public UserService getUserService() { + return serviceContext.newService(UserService.class); + } + public EmailService getEmailService() { return serviceContext.newService(EmailService.class); } @@ -641,6 +682,14 @@ this.currentCompany = currentCompany; } + public FaxToMailUser getCurrentUser() { + return currentUser; + } + + public void setCurrentUser(FaxToMailUser currentUser) { + this.currentUser = currentUser; + } + public Email getCurrentEmail() { return currentEmail; } @@ -648,4 +697,12 @@ public void setCurrentEmail(Email currentEmail) { this.currentEmail = currentEmail; } + + public List<MailFolder> getExpandedFolders() { + return expandedFolders; + } + + public void setExpandedFolders(List<MailFolder> expandedFolders) { + this.expandedFolders = expandedFolders; + } } Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/RunFaxToMail.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/RunFaxToMail.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/RunFaxToMail.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.FaxToMailConfiguration; import com.franciaflex.faxtomail.ui.swing.content.MainUI; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; @@ -135,7 +157,7 @@ handler.onCloseUI(); //close context -// context.getSwingSession().save(); + context.getSwingSession().save(); context.close(); if (exitCode != null) { Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractChangeScreenAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractChangeScreenAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractChangeScreenAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.FaxToMailScreen; import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractFaxToMailAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.FaxToMailConfiguration; import com.franciaflex.faxtomail.persistence.ProgressionModel; import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractMainUIFaxToMailAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractMainUIFaxToMailAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/AbstractMainUIFaxToMailAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.FaxToMailUIContext; import com.franciaflex.faxtomail.ui.swing.content.MainUI; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/CloseApplicationAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.RunFaxToMail; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GoToPreviousScreenAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GoToPreviousScreenAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/GoToPreviousScreenAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.content.MainUIHandler; import static org.nuiton.i18n.I18n.t; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ReloadFaxToMailAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ReloadFaxToMailAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ReloadFaxToMailAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.RunFaxToMail; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowConfigAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowConfigAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowConfigAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.FaxToMailScreen; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,8 +1,38 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.Email; import com.franciaflex.faxtomail.ui.swing.FaxToMailScreen; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; +import javax.swing.*; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +import static org.nuiton.i18n.I18n.t; + /** * To show demande screen. * @@ -12,6 +42,17 @@ public class ShowDemandeAction extends AbstractChangeScreenAction { public ShowDemandeAction(MainUIHandler handler) { - super(handler, true, FaxToMailScreen.DEMANDE); + super(handler, false, FaxToMailScreen.DEMANDE); } + + @Override + public void postSuccessAction() { + super.postSuccessAction(); + + Email currentEmail = getContext().getCurrentEmail(); + if (!getContext().getCurrentUser().equals(currentEmail.getTakenBy())) { + displayWarningMessage(t("faxtomail.alert.alreadyTakenBy.title"), + t("faxtomail.alert.alreadyTakenBy.message", currentEmail.getTakenBy().getName())); + } + } } Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowDemandeListAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.FaxToMailScreen; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/ShowRechercheAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.FaxToMailScreen; import com.franciaflex.faxtomail.ui.swing.content.MainUIHandler; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/StartAction.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/StartAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/StartAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.actions; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.content.MainUIHandler; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.css =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.css 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.css 2014-02-14 17:28:56 UTC (rev 10) @@ -1,4 +1,25 @@ /* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ +/* #busyBlockLayerUI { useIcon:false; blockingColor: {model.getConfig().getColorBlockingLayer()}; @@ -20,6 +41,7 @@ } #menuFileDemandeList { + actionIcon: list; text: "faxtomail.main.action.demandeList"; toolTipText: "faxtomail.main.action.demandeList.tip"; i18nMnemonic: "faxtomail.main.action.demandeList.mnemonic"; @@ -28,6 +50,7 @@ } #menuFileRecherche { + actionIcon: search; text: "faxtomail.main.action.recherche"; toolTipText: "faxtomail.main.action.recherche.tip"; i18nMnemonic: "faxtomail.main.action.recherche.mnemonic"; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.jaxx =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.jaxx 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUI.jaxx 2014-02-14 17:28:56 UTC (rev 10) @@ -1,6 +1,27 @@ +<!-- + #%L + FaxToMail :: UI + %% + Copyright (C) 2014 Franciaflex + %% + 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% + --> <JFrame id='mainFrame' implements='com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI<FaxToMailUIContext, MainUIHandler>' - width='800' height='600'> + width='1024' height='780'> <import> com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/MainUIHandler.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,28 @@ package com.franciaflex.faxtomail.ui.swing.content; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.Email; import com.franciaflex.faxtomail.ui.swing.FaxToMailScreen; import com.franciaflex.faxtomail.ui.swing.FaxToMailUIContext; import com.franciaflex.faxtomail.ui.swing.RunFaxToMail; @@ -14,6 +37,8 @@ import com.google.common.base.Preconditions; import jaxx.runtime.JAXXBinding; import jaxx.runtime.SwingUtil; +import jaxx.runtime.swing.JAXXWidgetUtil; +import jaxx.runtime.swing.session.SwingSession; import jaxx.runtime.validator.swing.SwingValidator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -117,9 +142,9 @@ // ui.applyDataBinding(MainUI.BINDING_MENU_CHANGE_LOCALE_UK_ENABLED); // Init SwingSession -// SwingSession swingSession = context.getSwingSession(); -// swingSession.add(ui); -// swingSession.save(); + SwingSession swingSession = getContext().getSwingSession(); + swingSession.add(ui); + swingSession.save(); // SwingUtil.getLayer(ui.getBody()).setUI(new BetaLayerUI()); @@ -281,7 +306,7 @@ FaxToMailUI<?, ?> body = (FaxToMailUI<?, ?>) currentBody; body.getHandler().onCloseUI(); -// context.getSwingSession().save(); + getContext().getSwingSession().save(); ui.getBody().remove(currentBody); @@ -308,20 +333,21 @@ case SEARCH: screenUI = new SearchUI(ui); screenTitle = t("faxtomail.search.title"); - icon = ui.getMenuFileConfiguration().getIcon(); + icon = ui.getMenuFileRecherche().getIcon(); break; case DEMANDE: screenUI = new DemandeUI(ui); - screenTitle = t("faxtomail.demande.title"); - icon = ui.getMenuFileConfiguration().getIcon(); + Email currentEmail = getContext().getCurrentEmail(); + screenTitle = currentEmail.getObject(); + icon = JAXXWidgetUtil.createActionIcon("email"); break; default: case LIST: screenUI = new DemandeListUI(ui); screenTitle = t("faxtomail.demandeList.title"); - icon = ui.getMenuFileConfiguration().getIcon(); + icon = ui.getMenuFileDemandeList().getIcon(); break; } @@ -336,7 +362,7 @@ // } // rightDecoration.add(showHelp, 0); this.currentBody = screenUI; -// context.getSwingSession().add(currentBody, true); + getContext().getSwingSession().add(currentBody, true); ui.getBody().setTitle(screenTitle); ui.getBody().add(currentBody); ui.getBody().setLeftDecoration(new JLabel(icon)); Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.css =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.css 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.css 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ #configTopPanel { _help: {"faxtomail.config.help"}; } Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.jaxx =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.jaxx 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUI.jaxx 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +<!-- + #%L + FaxToMail :: UI + %% + Copyright (C) 2014 Franciaflex + %% + 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% + --> <JPanel id='configTopPanel' layout='{new BorderLayout()}' implements='com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI<FaxToMailUIContext, FaxToMailConfigUIHandler>'> Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUIHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUIHandler.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/config/FaxToMailConfigUIHandler.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.content.config; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.FaxToMailUIContext; import com.franciaflex.faxtomail.ui.swing.actions.ReloadFaxToMailAction; import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.css 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ #navigationTree { font-size: "11"; rootVisible: false; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.jaxx =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.jaxx 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUI.jaxx 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +<!-- + #%L + FaxToMail :: UI + %% + Copyright (C) 2014 Franciaflex + %% + 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% + --> <JPanel id='demandeListPanel' layout='{new BorderLayout()}' implements='com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI<DemandeListUIModel, DemandeListUIHandler>'> @@ -42,7 +63,6 @@ </JScrollPane> <JPanel layout='{new BorderLayout()}'> - <JLabel id="selectedFolder" constraints='BorderLayout.NORTH'/> <JScrollPane constraints='BorderLayout.CENTER'> <JXTable id='dataTable' onMouseClicked='handler.autoSelectRowInTable(event, tablePopup)' 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java 2014-02-14 17:28:56 UTC (rev 10) @@ -2,15 +2,13 @@ /* * #%L - * Tutti :: UI - * $Id: EditCruiseUIHandler.java 1282 2013-10-07 14:46:55Z tchemit $ - * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/java/... $ + * FaxToMail :: UI * %% - * Copyright (C) 2012 Ifremer + * Copyright (C) 2014 Franciaflex * %% * 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 + * 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, @@ -18,7 +16,7 @@ * 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 + * 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% @@ -30,32 +28,47 @@ import com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeAction; import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailUIHandler; import com.franciaflex.faxtomail.ui.swing.util.CloseableUI; +import com.google.common.collect.Lists; import jaxx.runtime.swing.JAXXWidgetUtil; import jaxx.runtime.validator.swing.SwingValidator; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jdesktop.swingx.JXTable; +import org.jdesktop.swingx.decorator.ComponentAdapter; +import org.jdesktop.swingx.decorator.HighlightPredicate; +import org.jdesktop.swingx.decorator.Highlighter; import org.jdesktop.swingx.table.DefaultTableColumnModelExt; import org.jdesktop.swingx.table.TableColumnModelExt; import org.nuiton.jaxx.application.swing.table.AbstractApplicationTableModel; import javax.swing.*; +import javax.swing.event.ChangeListener; +import javax.swing.event.RowSorterEvent; +import javax.swing.event.RowSorterListener; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; +import javax.swing.table.TableModel; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeModel; +import javax.swing.tree.TreeNode; +import javax.swing.tree.TreePath; +import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Date; +import java.util.Enumeration; +import java.util.HashMap; import java.util.List; +import java.util.Map; import static org.nuiton.i18n.I18n.t; @@ -70,25 +83,6 @@ /** Logger. */ private static final Log log = LogFactory.getLog(DemandeListUIHandler.class); - - public static String getTitle(boolean exist) { - - String result; - if (exist) { - result = t("tutti.editCruise.title.edit.cruise"); - } else { - result = t("tutti.editCruise.title.create.cruise"); - } - return result; - } - - /** - * Persistence service. - * - * @since 0.1 - */ -// private final PersistenceService persistenceService; - @Override public void beforeInit(DemandeListUI ui) { @@ -119,8 +113,11 @@ // init tree DefaultMutableTreeNode root = new DefaultMutableTreeNode("root"); + + List<MailFolder> foldersToExpand = getContext().getExpandedFolders(); + Map<MailFolder, DefaultMutableTreeNode> nodesByFolder = new HashMap<MailFolder, DefaultMutableTreeNode>(); for (MailFolder folder : getModel().getFolders()) { - createFolderTree(root, folder); + nodesByFolder.putAll(createFolderTree(root, folder)); } TreeModel treeModel = new DefaultTreeModel(root); @@ -133,7 +130,6 @@ renderer.setLeafIcon(folderIcon); navigationTree.setCellRenderer(renderer); - JAXXWidgetUtil.expandTree(navigationTree); navigationTree.addTreeSelectionListener(new TreeSelectionListener() { @Override public void valueChanged(TreeSelectionEvent e) { @@ -143,6 +139,12 @@ } }); + // expand nodes + for (MailFolder folder : foldersToExpand) { + DefaultMutableTreeNode node = nodesByFolder.get(folder); + navigationTree.expandPath(new TreePath(node.getPath())); + } + // init table TableColumnModelExt columnModel = new DefaultTableColumnModelExt(); Company franciaflex = getContext().getCurrentCompany(); @@ -161,18 +163,51 @@ .setSortable(true); } - final AbstractApplicationTableModel tableModel = new DemandeTableModel(columnModel); + final AbstractApplicationTableModel<Email> tableModel = new DemandeTableModel(columnModel); JXTable table = ui.getDataTable(); table.setModel(tableModel); table.setColumnModel(columnModel); table.getTableHeader().setReorderingAllowed(false); + Highlighter highlighter = new Highlighter() { + @Override + public Component highlight(Component renderer, ComponentAdapter adapter) { + int viewRow = adapter.row; + int modelRow = adapter.convertRowIndexToModel(viewRow); + Email row = (Email) tableModel.getEntry(modelRow); + boolean highlight = row.getTakenBy() == null; + if (highlight) { + Font font = renderer.getFont(); + renderer.setFont(font.deriveFont(Font.BOLD)); + } + return renderer; + } + + @Override + public void addChangeListener(ChangeListener l) { + } + + @Override + public void removeChangeListener(ChangeListener l) { + } + + @Override + public ChangeListener[] getChangeListeners() { + return new ChangeListener[0]; + } + }; + table.addHighlighter(highlighter); + table.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { JXTable table = (JXTable) evt.getSource(); if (evt.getClickCount() == 2) { int rowIndex = table.getSelectedRow(); - Email selectedEmail = (Email) tableModel.getEntry(rowIndex); + rowIndex = table.convertRowIndexToModel(rowIndex); + + Email selectedEmail = tableModel.getEntry(rowIndex); + selectedEmail = getContext().getEmailService().addToOpeningHistory(selectedEmail, getContext().getCurrentUser(), new Date()); + getContext().setCurrentEmail(selectedEmail); getContext().getActionEngine().runAction(new ShowDemandeAction(getContext().getMainUI().getHandler())); } @@ -186,25 +221,37 @@ tableModel.setRows(emails); } }); - getModel().addPropertyChangeListener(DemandeListUIModel.PROPERTY_SELECTED_FOLDER, new PropertyChangeListener() { - @Override - public void propertyChange(PropertyChangeEvent evt) { - MailFolder folder = (MailFolder) evt.getNewValue(); - String name = folder != null ? folder.getName() : null; - getUI().getSelectedFolder().setText(name); - } - }); + Email currentEmail = getContext().getCurrentEmail(); + if (currentEmail != null) { + MailFolder folder = currentEmail.getMailFolder(); + DefaultMutableTreeNode node = nodesByFolder.get(folder); + navigationTree.setSelectionPath(new TreePath(node.getPath())); + int row = tableModel.getRowIndex(currentEmail); + table.setRowSelectionInterval(row, row); + } + } - protected void createFolderTree(DefaultMutableTreeNode parent, MailFolder folder) { + /** + * Creates the tree nodes and returns a map of the nodes by folder + * @param parent the node parent + * @param folder the folder to add to the tree + * @return the map of the nodes by folder + */ + protected Map<MailFolder, DefaultMutableTreeNode> createFolderTree(DefaultMutableTreeNode parent, MailFolder folder) { + Map<MailFolder, DefaultMutableTreeNode> result = new HashMap<MailFolder, DefaultMutableTreeNode>(); + DefaultMutableTreeNode node = new FolderTreeNode(folder); + result.put(folder, node); + parent.add(node); if (folder.isChildrenNotEmpty()) { for (MailFolder child : folder.getChildren()) { - createFolderTree(node, child); + result.putAll(createFolderTree(node, child)); } } + return result; } @Override @@ -217,8 +264,22 @@ if (log.isDebugEnabled()) { log.debug("closing: " + ui); } + + JTree tree = getUI().getNavigationTree(); + TreeModel treeModel = tree.getModel(); + Enumeration<TreePath> paths = tree.getExpandedDescendants(new TreePath(treeModel.getRoot())); + + List<MailFolder> folders = new ArrayList<MailFolder>(); + while (paths.hasMoreElements()) { + TreePath path = paths.nextElement(); + Object lastPathComponent = path.getLastPathComponent(); + if (FolderTreeNode.class.isAssignableFrom(lastPathComponent.getClass())) { + folders.add(((FolderTreeNode) lastPathComponent).getMailFolder()); + } + } + getContext().setExpandedFolders(folders); + clearValidators(); - } @Override Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIModel.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIModel.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIModel.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.content.demande; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.Email; import com.franciaflex.faxtomail.persistence.entities.MailFolder; import org.jdesktop.beans.AbstractSerializableBean; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeTableModel.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeTableModel.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeTableModel.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.content.demande; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.Email; import com.franciaflex.faxtomail.persistence.entities.EmailImpl; import org.apache.commons.logging.Log; @@ -80,9 +102,9 @@ n("faxtomail.demandeList.table.header.waitingState"), n("faxtomail.demandeList.table.header.waitingState"))); - put(Email.PROPERTY_FAX_TO_MAIL_USER, + put(Email.PROPERTY_TAKEN_BY, ColumnIdentifier.<Email>newReadOnlyId( - Email.PROPERTY_FAX_TO_MAIL_USER, + Email.PROPERTY_TAKEN_BY, n("faxtomail.demandeList.table.header.user"), n("faxtomail.demandeList.table.header.user"))); 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.css 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ BeanFilterableComboBox { showReset: true; bean: {model}; @@ -24,8 +45,7 @@ } #receivedDateField { - text: {getDateFormat().format(model.getReceptionDate())}; - editable: false; + text: {SimpleDateFormat.getDateTimeInstance().format(model.getReceptionDate())}; } #senderLabel { @@ -34,7 +54,6 @@ #senderField { text: {model.getSenderEmailAddress()}; - editable: false; } #clientLabel { @@ -121,21 +140,65 @@ text: "faxtomail.demande.message.label"; } +#takenByLabel { + text: "faxtomail.demande.takenBy.label"; +} + +#takenByField { + text: {model.getTakenBy().getName()}; +} + +#firstOpenedByLabel { + text: "faxtomail.demande.firstOpenedBy.label"; +} + +#firstOpenedByField { + text: {model.getFirstOpeningUserName()}; +} + +#firstOpeningDateLabel { + text: "faxtomail.demande.firstOpeningDate.label"; +} + +#firstOpeningDateField { + text: {SimpleDateFormat.getDateTimeInstance().format(model.getFirstOpeningDate())}; +} + +#lastModifiedByLabel { + text: "faxtomail.demande.lastModifiedBy.label"; +} + +#lastModifiedByField { + text: {model.getLastModificationUserName()}; +} + +#lastModificationDateLabel { + text: "faxtomail.demande.lastModificationDate.label"; +} + +#lastModificationDateField { + text: {SimpleDateFormat.getDateTimeInstance().format(model.getLastModificationDate())}; +} + #backButton { text: "faxtomail.demande.back.button.label"; + actionIcon: cancel; _applicationAction: {com.franciaflex.faxtomail.ui.swing.actions.ShowDemandeListAction.class}; } #saveButton { text: "faxtomail.demande.save.button.label"; + actionIcon: save; } #transmitButton { text: "faxtomail.demande.transmit.button.label"; + actionIcon: transmit; } #printButton { text: "faxtomail.demande.print.button.label"; + actionIcon: print; } #archiveButton { 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUI.jaxx 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +<!-- + #%L + FaxToMail :: UI + %% + Copyright (C) 2014 Franciaflex + %% + 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% + --> <JPanel id='demandePanel' layout='{new BorderLayout()}' implements='com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI<DemandeUIModel, DemandeUIHandler>'> @@ -32,40 +53,35 @@ <DemandeUIModel id='model' initializer='getContextValue(DemandeUIModel.class)'/> - <String id='patternLayout' javaBean='"dd/MM/yyyy HH:mm:ss"'/> - - <SimpleDateFormat id='dateFormat' constructorParams='patternLayout'/> - - <Date id='date' javaBean='new Date()'/> - <JScrollPane id='demandeScrollPane' constraints='BorderLayout.CENTER'> <JPanel layout='{new GridLayout(0,1)}'> - <Table fill='both'> - + <Table fill='horizontal'> <row> - <cell anchor='east'> + <cell> <JLabel id='receivedDateLabel'/> </cell> - <cell weightx='1'> - <JTextField id='receivedDateField'/> + <cell> + <JLabel id='receivedDateField'/> </cell> - <cell anchor='east'> + <cell> <JLabel id='senderLabel'/> </cell> - <cell weightx='1'> - <JTextField id='senderField'/> + <cell> + <JLabel id='senderField'/> </cell> - <cell anchor='east'> + <cell> <JLabel id='clientLabel'/> </cell> <cell weightx='1'> <JTextField id='clientField'/><!-- TODO list of clients --> </cell> </row> + </Table> + <Table fill='horizontal'> <row> <cell anchor='east'> <JLabel id='objectLabel'/> @@ -174,8 +190,43 @@ <JTextArea id='messageField'/> </JScrollPane> </cell> - </row> + </row> + </Table> + <Table fill='horizontal'> + <row> + <cell> + <JLabel id="takenByLabel"/> + </cell> + <cell weightx='1' > + <JLabel id="takenByField"/> + </cell> + <cell> + <JLabel id="firstOpenedByLabel"/> + </cell> + <cell> + <JLabel id="firstOpenedByField"/> + </cell> + <cell> + <JLabel id="firstOpeningDateLabel"/> + </cell> + <cell weightx='1' > + <JLabel id="firstOpeningDateField"/> + </cell> + <cell> + <JLabel id="lastModifiedByLabel"/> + </cell> + <cell> + <JLabel id="lastModifiedByField"/> + </cell> + <cell> + <JLabel id="lastModificationDateLabel"/> + </cell> + <cell weightx='1'> + <JLabel id="lastModificationDateField"/> + </cell> + </row> + </Table> <JPanel id="attachmentsPanel" 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIHandler.java 2014-02-14 17:28:56 UTC (rev 10) @@ -2,15 +2,13 @@ /* * #%L - * Tutti :: UI - * $Id: EditCruiseUIHandler.java 1282 2013-10-07 14:46:55Z tchemit $ - * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/java/... $ + * FaxToMail :: UI * %% - * Copyright (C) 2012 Ifremer + * Copyright (C) 2014 Franciaflex * %% * 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 + * 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, @@ -18,12 +16,13 @@ * 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 + * 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.Company; import com.franciaflex.faxtomail.persistence.entities.Email; import com.franciaflex.faxtomail.persistence.entities.MailFolder; @@ -57,18 +56,6 @@ /** Logger. */ private static final Log log = LogFactory.getLog(DemandeUIHandler.class); - - public static String getTitle(boolean exist) { - - String result; - if (exist) { - result = t("tutti.editCruise.title.edit.cruise"); - } else { - result = t("tutti.editCruise.title.create.cruise"); - } - return result; - } - /** * Persistence service. * @@ -83,7 +70,6 @@ DemandeUIModel model = new DemandeUIModel(); model.fromBean(getContext().getCurrentEmail()); - log.debug(model.getDemandStatus()); this.ui.setContextValue(model); } @@ -100,7 +86,6 @@ initBeanFilterableComboBox(ui.getStatusComboBox(), referentielService.getAllDemandStatus(), model.getDemandStatus()); initBeanFilterableComboBox(ui.getPriorityComboBox(), referentielService.getAllPriority(), model.getPriority()); initBeanFilterableComboBox(ui.getGammeComboBox(), referentielService.getAllRange(), null); - } @Override 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeUIModel.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.content.demande; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.Client; import com.franciaflex.faxtomail.persistence.entities.DemandStatus; import com.franciaflex.faxtomail.persistence.entities.DemandType; @@ -7,21 +29,34 @@ import com.franciaflex.faxtomail.persistence.entities.EmailImpl; import com.franciaflex.faxtomail.persistence.entities.EtatAttente; import com.franciaflex.faxtomail.persistence.entities.FaxToMailUser; +import com.franciaflex.faxtomail.persistence.entities.History; +import com.franciaflex.faxtomail.persistence.entities.HistoryType; import com.franciaflex.faxtomail.persistence.entities.Priority; import com.franciaflex.faxtomail.ui.swing.util.AbstractFaxToMailBeanUIModel; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.nuiton.util.beans.Binder; import org.nuiton.util.beans.BinderFactory; +import java.util.Collection; import java.util.Date; +import static org.nuiton.i18n.I18n.t; + /** * @author kmorin <kmorin@codelutin.com> * @since x.x */ public class DemandeUIModel extends AbstractFaxToMailBeanUIModel<Email, DemandeUIModel> { + private static final Log log = LogFactory.getLog(DemandeUIModel.class); + protected final Email editObject = new EmailImpl(); + protected History firstOpeningHistory; + + protected History lastModificationHistory; + protected static Binder<DemandeUIModel, Email> toBeanBinder = BinderFactory.newBinder(DemandeUIModel.class, Email.class); @@ -33,6 +68,13 @@ super(fromBeanBinder, toBeanBinder); } + @Override + public void fromEntity(Email entity) { + super.fromEntity(entity); + firstOpeningHistory = null; + lastModificationHistory = null; + } + public void setSavNumber(String savNumber) { Object oldValue = getSavNumber(); editObject.setSavNumber(savNumber); @@ -103,14 +145,14 @@ return editObject.getEtatAttente(); } - public void setFaxToMailUser(FaxToMailUser faxToMailUser) { - Object oldValue = getFaxToMailUser(); - editObject.setFaxToMailUser(faxToMailUser); - firePropertyChanged(Email.PROPERTY_FAX_TO_MAIL_USER, oldValue, faxToMailUser); + public void setTakenBy(FaxToMailUser faxToMailUser) { + Object oldValue = getTakenBy(); + editObject.setTakenBy(faxToMailUser); + firePropertyChanged(Email.PROPERTY_TAKEN_BY, oldValue, faxToMailUser); } - public FaxToMailUser getFaxToMailUser() { - return editObject.getFaxToMailUser(); + public FaxToMailUser getTakenBy() { + return editObject.getTakenBy(); } public Priority getPriority() { @@ -183,6 +225,82 @@ return editObject.getProjectReference(); } + public void setHistory(Collection<History> history) { + Object oldValue = getHistory(); + editObject.setHistory(history); + firePropertyChanged(Email.PROPERTY_HISTORY, oldValue, history); + } + + public Collection<History> getHistory() { + return editObject.getHistory(); + } + + public void findFirstOpeningHistory() { + History result = null; + Date date = null; + for (History history : getHistory()) { + if (HistoryType.OPENING.equals(history.getType())) { + if (date == null || date.after(history.getModificationDate())) { + date = history.getModificationDate(); + result = history; + } + } + } + firstOpeningHistory = result; + } + + public void findLastModificationHistory() { + History result = null; + Date date = null; + for (History history : getHistory()) { + if (HistoryType.MODIFICATION.equals(history.getType())) { + if (date == null || date.before(history.getModificationDate())) { + date = history.getModificationDate(); + result = history; + } + } + } + lastModificationHistory = result; + } + + public History getFirstOpeningHistory() { + if (firstOpeningHistory == null) { + findFirstOpeningHistory(); + } + return firstOpeningHistory; + } + + public String getFirstOpeningUserName() { + return getFirstOpeningHistory().getFaxToMailUser().getName(); + } + + public Date getFirstOpeningDate() { + return getFirstOpeningHistory().getModificationDate(); + } + + public History getLastModificationHistory() { + if (lastModificationHistory == null) { + findLastModificationHistory(); + } + return lastModificationHistory; + } + + public String getLastModificationUserName() { + String result; + FaxToMailUser user = getLastModificationHistory().getFaxToMailUser(); + if (user != null) { + result = user.getName(); + } else { + result = t("faxtomail.systemUser"); + } + return result; + } + + public Date getLastModificationDate() { + return getLastModificationHistory().getModificationDate(); + } + + @Override protected Email newEntity() { return new EmailImpl(); Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/FolderTreeNode.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/FolderTreeNode.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/FolderTreeNode.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,6 +1,29 @@ package com.franciaflex.faxtomail.ui.swing.content.demande; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.MailFolder; +import org.apache.commons.logging.LogFactory; import javax.swing.tree.DefaultMutableTreeNode; 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.css 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ BeanFilterableComboBox { showReset: true; bean: {model}; 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUI.jaxx 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +<!-- + #%L + FaxToMail :: UI + %% + Copyright (C) 2014 Franciaflex + %% + 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% + --> <JPanel id='searchPanel' layout='{new BorderLayout()}' implements='com.franciaflex.faxtomail.ui.swing.util.FaxToMailUI<SearchUIModel, SearchUIHandler>'> 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIHandler.java 2014-02-14 17:28:56 UTC (rev 10) @@ -2,15 +2,13 @@ /* * #%L - * Tutti :: UI - * $Id: EditCruiseUIHandler.java 1282 2013-10-07 14:46:55Z tchemit $ - * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/java/... $ + * FaxToMail :: UI * %% - * Copyright (C) 2012 Ifremer + * Copyright (C) 2014 Franciaflex * %% * 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 + * 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, @@ -18,7 +16,7 @@ * 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 + * 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% @@ -60,18 +58,6 @@ /** Logger. */ private static final Log log = LogFactory.getLog(SearchUIHandler.class); - - public static String getTitle(boolean exist) { - - String result; - if (exist) { - result = t("tutti.editCruise.title.edit.cruise"); - } else { - result = t("tutti.editCruise.title.create.cruise"); - } - return result; - } - /** * Persistence service. * 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/search/SearchUIModel.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.content.search; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ + /** * @author kmorin <kmorin@codelutin.com> * @since x.x Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailBeanUIModel.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailBeanUIModel.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailBeanUIModel.java 2014-02-14 17:28:56 UTC (rev 10) @@ -2,15 +2,13 @@ /* * #%L - * Tutti :: UI - * $Id: AbstractTuttiBeanUIModel.java 1564 2014-01-31 10:56:26Z tchemit $ - * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/java/... $ + * FaxToMail :: UI * %% - * Copyright (C) 2012 Ifremer + * Copyright (C) 2014 Franciaflex * %% * 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 + * 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, @@ -18,7 +16,7 @@ * 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 + * 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% @@ -109,7 +107,7 @@ } //------------------------------------------------------------------------// - //-- TuttiEntity methods --// + //-- Entity methods --// //------------------------------------------------------------------------// // @Override 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/AbstractFaxToMailUIHandler.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.util; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.FaxToMailConfiguration; import com.franciaflex.faxtomail.persistence.entities.HasLabel; import com.franciaflex.faxtomail.services.DecoratorService; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/Cancelable.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/Cancelable.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/Cancelable.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.util; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ + /** * To cancel contract. * Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CloseableUI.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CloseableUI.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/CloseableUI.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.util; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ + /** * Contract to close an ui. * Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailExceptionHandler.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailExceptionHandler.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailExceptionHandler.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.util; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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.ui.swing.actions.AbstractChangeScreenAction; import com.franciaflex.faxtomail.ui.swing.actions.AbstractFaxToMailAction; import org.apache.commons.logging.Log; Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUI.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUI.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUI.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.util; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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 jaxx.runtime.JAXXObject; import org.nuiton.jaxx.application.swing.ApplicationUI; 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/FaxToMailUIUtil.java 2014-02-14 17:28:56 UTC (rev 10) @@ -2,15 +2,13 @@ /* * #%L - * Tutti :: UI - * $Id: TuttiUIUtil.java 1298 2013-10-14 18:30:59Z tchemit $ - * $HeadURL: http://svn.forge.codelutin.com/svn/tutti/trunk/tutti-ui-swing/src/main/java/... $ + * FaxToMail :: UI * %% - * Copyright (C) 2012 Ifremer + * Copyright (C) 2014 Franciaflex * %% * 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 + * 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, @@ -18,7 +16,7 @@ * 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 + * 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% @@ -31,6 +29,12 @@ import org.apache.commons.logging.LogFactory; import org.nuiton.jaxx.application.swing.util.ApplicationUIUtil; +import javax.swing.*; +import javax.swing.tree.TreePath; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; + /** * @author tchemit <chemit@codelutin.com> * @since 0.1 Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/RemoveablePropertyChangeListener.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/RemoveablePropertyChangeListener.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/RemoveablePropertyChangeListener.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.util; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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 java.beans.PropertyChangeListener; /** Modified: trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/UIMessageNotifier.java =================================================================== --- trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/UIMessageNotifier.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/util/UIMessageNotifier.java 2014-02-14 17:28:56 UTC (rev 10) @@ -1,5 +1,27 @@ package com.franciaflex.faxtomail.ui.swing.util; +/* + * #%L + * FaxToMail :: UI + * %% + * Copyright (C) 2014 Franciaflex + * %% + * 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% + */ + /** * To notify somemessage in ui. * Modified: trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties =================================================================== --- trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_en_GB.properties 2014-02-14 17:28:56 UTC (rev 10) @@ -13,6 +13,8 @@ application.action.create.error= application.error.ui.business.warning= faxtomail.action.create.error= +faxtomail.alert.alreadyTakenBy.message= +faxtomail.alert.alreadyTakenBy.title= faxtomail.archive.button.label= faxtomail.back.button.label= faxtomail.common.askBeforeDelete.help= @@ -61,6 +63,8 @@ faxtomail.config.parse.error= faxtomail.config.save.error= faxtomail.config.title= +faxtomail.demand.alreadyTakenBy= +faxtomail.demande.alreadyTakenBy= faxtomail.demande.archive.button.label= faxtomail.demande.back.button.label= faxtomail.demande.client.label= @@ -69,7 +73,11 @@ faxtomail.demande.ediCodeNumber.label= faxtomail.demande.etatAttente.label= faxtomail.demande.finishedProducts.label= +faxtomail.demande.firstOpenedBy.label= +faxtomail.demande.firstOpeningDate.label= faxtomail.demande.gamme.label= +faxtomail.demande.lastModificationDate.label= +faxtomail.demande.lastModifiedBy.label= faxtomail.demande.message.label= faxtomail.demande.object.label= faxtomail.demande.print.button.label= @@ -82,6 +90,7 @@ faxtomail.demande.save.button.label= faxtomail.demande.sender.label= faxtomail.demande.status.label= +faxtomail.demande.takenBy.label= faxtomail.demande.tcc.label= faxtomail.demande.title= faxtomail.demande.transmit.button.label= @@ -159,6 +168,7 @@ faxtomail.search.sender.label= faxtomail.search.status.label= faxtomail.search.title= +faxtomail.systemUser= faxtomail.transmit.button.label= swing.error.cannot.mail= swing.error.cannot.open.link= 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-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/resources/i18n/faxtomail-ui-swing_fr_FR.properties 2014-02-14 17:28:56 UTC (rev 10) @@ -12,62 +12,23 @@ Voir= application.action.create.error= application.error.ui.business.warning= -faxtomail.action.create.error= -faxtomail.common.askBeforeDelete.help= -faxtomail.common.askCancelEditBeforeLeaving.help= -faxtomail.common.askCancelEditBeforeLeaving.title= -faxtomail.common.askOverwriteFile.help= -faxtomail.common.askOverwriteFile.message= -faxtomail.common.askOverwriteFile.title= -faxtomail.common.askSaveBeforeLeaving.help= -faxtomail.common.askSaveBeforeLeaving.title= -faxtomail.common.datefield.tip= -faxtomail.config.action.reload.actions= -faxtomail.config.action.reload.application= -faxtomail.config.action.reload.ui= +faxtomail.alert.alreadyTakenBy.message=Le document est déjà attribué à l'utilisateur %s. +faxtomail.alert.alreadyTakenBy.title=Document déjà attribué faxtomail.config.application= -faxtomail.config.category.applications= -faxtomail.config.category.applications.description= -faxtomail.config.category.technical= -faxtomail.config.category.technical.description= -faxtomail.config.category.ui= -faxtomail.config.category.ui.description= -faxtomail.config.option.basedir.shortLabel= -faxtomail.config.option.csv.separator.shortLabel= -faxtomail.config.option.help.directory.description= -faxtomail.config.option.help.directory.shortLabel= -faxtomail.config.option.i18n.directory.description= -faxtomail.config.option.i18n.directory.shortLabel= -faxtomail.config.option.i18n.locale.description= -faxtomail.config.option.launch.mode.description= -faxtomail.config.option.site.url.shortLabel= -faxtomail.config.option.startActionFile.description= -faxtomail.config.option.tmp.directory.shortLabel= -faxtomail.config.option.ui.autoPopupNumberEditor.description= -faxtomail.config.option.ui.color.alternateRow.description= -faxtomail.config.option.ui.color.alternateRow.shortLabel= -faxtomail.config.option.ui.color.blockingLayer.description= -faxtomail.config.option.ui.color.blockingLayer.shortLabel= -faxtomail.config.option.ui.color.selectedRow.description= -faxtomail.config.option.ui.color.selectedRow.shortLabel= -faxtomail.config.option.ui.config.file.description= -faxtomail.config.option.ui.config.file.shortLabel= -faxtomail.config.option.ui.dateFormat.description= -faxtomail.config.option.ui.dateFormat.shortLabel= -faxtomail.config.option.ui.shortcut.closePopup.description= -faxtomail.config.option.ui.showNumberEditorButton.description= -faxtomail.config.parse.error= -faxtomail.config.save.error= faxtomail.config.title= faxtomail.demande.archive.button.label=Archiver -faxtomail.demande.back.button.label=Retour +faxtomail.demande.back.button.label=Annuler faxtomail.demande.client.label=Client faxtomail.demande.demandeNumber.label=N° Devis/Cde faxtomail.demande.docType.label=Type faxtomail.demande.ediCodeNumber.label=Retour EDI faxtomail.demande.etatAttente.label=État attente faxtomail.demande.finishedProducts.label=Produits finis +faxtomail.demande.firstOpenedBy.label=Première ouverture par +faxtomail.demande.firstOpeningDate.label=le faxtomail.demande.gamme.label=Gamme +faxtomail.demande.lastModificationDate.label=le +faxtomail.demande.lastModifiedBy.label=Dernière modification par faxtomail.demande.message.label=Message faxtomail.demande.object.label=Objet faxtomail.demande.print.button.label=Imprimer @@ -78,7 +39,7 @@ faxtomail.demande.save.button.label=Enregistrer faxtomail.demande.sender.label=Émetteur faxtomail.demande.status.label=Statut -faxtomail.demande.title=Demande +faxtomail.demande.takenBy.label=Pris par faxtomail.demande.transmit.button.label=Transmettre faxtomail.demandeList.action.attachment=Ajouter une pièce-jointe faxtomail.demandeList.action.attachment.mnemonic=A @@ -105,12 +66,6 @@ faxtomail.demandeList.table.header.user=Pris pas faxtomail.demandeList.table.header.waitingState=État attente faxtomail.demandeList.title=Gestion des fax -faxtomail.error.delete.startActionFile= -faxtomail.error.errorpane.htmlmessage= -faxtomail.error.read.startActionFile= -faxtomail.error.ui.business.error= -faxtomail.error.ui.business.warning= -faxtomail.error.ui.other.error= faxtomail.i18n.deleteCache.error= faxtomail.i18n.mkDir.error= faxtomail.main.action.configuration=Configuration @@ -130,13 +85,9 @@ faxtomail.main.menu.file=Fichier faxtomail.main.menu.file.mnemonic= faxtomail.main.menu.file.tip=Menu fichier -faxtomail.main.title.action= faxtomail.main.title.application=FaxToMail faxtomail.main.title.applicationName=FaxToMail faxtomail.main.title.nodb= -faxtomail.message.action.running= -faxtomail.property.get.error= -faxtomail.property.set.error= faxtomail.search.between2ndPart.label=et le faxtomail.search.button.label=Rechercher faxtomail.search.chantier.label=Chantier @@ -152,10 +103,4 @@ faxtomail.search.sender.label=Émetteur faxtomail.search.status.label=Statut faxtomail.search.title=Recherche -swing.error.cannot.mail= -swing.error.cannot.open.link= -swing.error.desktop.browse.not.supported= -swing.error.desktop.mail.not.supported= -swing.error.desktop.not.supported= -tutti.editCruise.title.create.cruise= -tutti.editCruise.title.edit.cruise= +faxtomail.systemUser=Système Modified: trunk/faxtomail-ui-swing/src/main/resources/log4j.properties =================================================================== --- trunk/faxtomail-ui-swing/src/main/resources/log4j.properties 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-swing/src/main/resources/log4j.properties 2014-02-14 17:28:56 UTC (rev 10) @@ -1,3 +1,24 @@ +### +# #%L +# FaxToMail :: UI +# %% +# Copyright (C) 2014 Franciaflex +# %% +# 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% +### log4j.rootCategory=WARN, console log4j.appender.console=org.apache.log4j.ConsoleAppender @@ -5,7 +26,7 @@ log4j.appender.console.layout.ConversionPattern=%d{yyyy/MM/dd hh:mm:ss} %5p (%F:%L) %M %m%n # global level -log4j.logger.com.franciaflex.faxtomail=TRACE +log4j.logger.com.franciaflex.faxtomail=DEBUG ### persistence level # log4j.logger.org.nuiton.topia=TRACE Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java =================================================================== --- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/action/admin/ConfigurationAction.java 2014-02-14 17:28:56 UTC (rev 10) @@ -163,7 +163,7 @@ result.put(Email.PROPERTY_CLIENT, "Client"); result.put(Email.PROPERTY_DEMAND_STATUS, "Statut"); result.put(Email.PROPERTY_DEMAND_TYPE, "Type"); - result.put(Email.PROPERTY_FAX_TO_MAIL_USER, "Pris par"); + result.put(Email.PROPERTY_TAKEN_BY, "Pris par"); result.put(Email.PROPERTY_ETAT_ATTENTE, "État attente"); return result; } Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2014-02-12 17:16:05 UTC (rev 9) +++ trunk/pom.xml 2014-02-14 17:28:56 UTC (rev 10) @@ -92,7 +92,7 @@ <hibernateVersion>4.2.8.Final</hibernateVersion> <h2Version>1.3.174</h2Version> - <jaxxVersion>2.8</jaxxVersion> + <jaxxVersion>2.8.2-SNAPSHOT</jaxxVersion> <swingXVersion>1.6.4</swingXVersion> <xworkVersion>2.3.15.1</xworkVersion> @@ -117,7 +117,7 @@ <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <!-- Last JRE version to use --> - <jreVersion>1.7.45</jreVersion> + <jreVersion>1.7.51</jreVersion> </properties>