branch feature/1207 updated (2956d2e -> 248ce54)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1207 in repository lima. See http://git.chorem.org/lima.git discards 2956d2e refs #1270 corrections d'erreurs majeures discards d0ce73b refs #1270 corrections d'erreurs majeures discards 06d873b refs #1207 : correction d'erreurs criticals adds f8d81c6 refs #1226 Hide close tab button if you cannot close the tab adds 2184fc7 fixes #1226 Hide close tab button if you cannot close the tab Merge branch 'feature/1226' into develop adds e06ef0c fixes #1193 La zone des critères de recherche apparait réduite, les critères de recherche ne sont donc pas visibles, il faudrait définir une taille minimale adds 2581c20 refs #1226 Hide close tab button if you cannot close the tab adds a9d9110 utilisation css adds e8a9357 fixes #1193: La zone des critères de recherche apparait réduite, les critères de recherche ne sont donc pas visibles, il faudrait définir une taille minimale Merge branch 'feature/1193' into develop adds 9243835 change remove icon on tab adds 47dacdc refs #1187 : account popups adds 0e30c25 refs #1187 : entry book popups adds 4ac2c21 refs #1187 : fiscal period popups adds ece040e refs #1187 : inancial statement popups adds 1f5f807 refs #1187 : Vat chart popups adds 37937e4 refs #1187 : identitiy popups adds 964faf1 fixes #1187: Améliorer l'apparence des Popup Merge branch 'feature/1187' into develop adds 3c0f684 refs #1221: Erreur à l'annulation des import/export adds 80adf13 fixes #1221 Erreur à l'annulation des import/export Merge branch 'feature/1221' into develop adds 9aa89d0 refs #1222: Le lettrage ne fonctionne plus adds cc2841b fixes #1222 Le lettrage ne fonctionne plus Merge branch 'feature/1222' into develop adds 8da87c9 refs #1209: A l'ajout automatique d'une écriture le focus ne correspond pas à la cellule éditée adds 275821d fixes #1209 A l'ajout automatique d'une écriture le focus ne correspond pas à la cellule éditée Merge branch 'feature/1209' into develop adds 89caf6e refs #1218: Plan BCR : exception à la deuxième modification d'un regrouppement adds 3e445d8 fixes #1218 Plan BCR : exception à la deuxième modification d'un regrouppement Merge branch 'feature/1218' into develop new ead303a refs #1207 : correction d'erreurs criticals new a0b7cbf refs #1207 corrections d'erreurs majeures new 78602e6 refs #1207 corrections d'erreurs majeures new 248ce54 rebase to develop (refs #1207) This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (2956d2e) \ N -- N -- N refs/heads/feature/1207 (248ce54) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 248ce540b90ad1de855962267b56169a84454287 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Apr 24 17:49:49 2015 +0200 rebase to develop (refs #1207) commit 78602e6e7cfe590b4539af03f57d83dd0a72902f Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Mar 21 07:44:17 2015 +0100 refs #1207 corrections d'erreurs majeures commit a0b7cbf7ffd4eb5a24d035627ded995a73ee1acb Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Mar 21 01:32:19 2015 +0100 refs #1207 corrections d'erreurs majeures commit ead303aaceb60840e697504d95a6515412b6a714 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Mar 21 00:32:12 2015 +0100 refs #1207 : correction d'erreurs criticals Summary of changes: .../business/api/FinancialStatementService.java | 4 +- .../ejb/FinancialStatementServiceImpl.java | 58 ++--- .../lima/business/ejb/ImportServiceImpl.java | 17 +- .../org/chorem/lima/FinancialStatementWayEnum.java | 30 +-- .../resources/i18n/lima-callao_en_GB.properties | 6 +- .../resources/i18n/lima-callao_fr_FR.properties | 6 +- .../src/main/java/org/chorem/lima/LimaMain.java | 1 + .../org/chorem/lima/enums/AccountsChartEnum.java | 24 +- .../lima/enums/FinancialStatementsChartEnum.java | 22 +- .../chorem/lima/enums/VatStatementsChartEnum.java | 26 +- .../java/org/chorem/lima/ui/ClosableTabHeader.css | 14 +- .../java/org/chorem/lima/ui/ClosableTabHeader.jaxx | 6 +- .../src/main/java/org/chorem/lima/ui/MainView.css | 275 +++++++++++++++++---- .../java/org/chorem/lima/ui/MainViewHandler.java | 1 + .../org/chorem/lima/ui/account/AccountForm.css | 2 + .../org/chorem/lima/ui/account/AccountForm.jaxx | 20 +- .../chorem/lima/ui/account/AccountImportForm.css | 39 +-- .../chorem/lima/ui/account/AccountImportForm.jaxx | 61 ++--- .../chorem/lima/ui/account/AccountViewHandler.java | 2 +- .../chorem/lima/ui/account/UpdateAccountForm.css | 2 + .../chorem/lima/ui/account/UpdateAccountForm.jaxx | 17 +- .../org/chorem/lima/ui/entrybook/EntryBookForm.css | 2 + .../chorem/lima/ui/entrybook/EntryBookForm.jaxx | 20 +- .../lima/ui/entrybook/EntryBookImportForm.css | 2 + .../lima/ui/entrybook/EntryBookImportForm.jaxx | 26 +- .../FinancialStatementChartTreeTableModel.java | 101 ++++---- .../FinancialStatementChartViewHandler.java | 24 +- .../FinancialStatementHeaderForm.css | 25 +- .../FinancialStatementHeaderForm.jaxx | 65 ++--- .../FinancialStatementImportForm.css | 41 ++- .../FinancialStatementImportForm.jaxx | 84 +++---- .../FinancialStatementMovementForm.css | 16 +- .../FinancialStatementMovementForm.jaxx | 63 +++-- .../FinancialTransactionTable.java | 11 +- .../FinancialTransactionViewHandler.java | 13 +- .../FinancialTransactionSearchView.css | 6 +- .../FinancialTransactionSearchView.jaxx | 7 +- .../FinancialTransactionSearchViewHandler.java | 14 +- .../org/chorem/lima/ui/fiscalperiod/AddPeriod.css | 6 +- .../org/chorem/lima/ui/fiscalperiod/AddPeriod.jaxx | 28 +-- .../ui/fiscalperiod/FiscalPeriodViewHandler.java | 70 ++++-- .../fiscalperiod/RetainedEarningsEntryBookForm.css | 33 ++- .../RetainedEarningsEntryBookForm.jaxx | 85 ++----- .../org/chorem/lima/ui/identity/IdentityForm.css | 18 +- .../org/chorem/lima/ui/identity/IdentityForm.jaxx | 130 +++++----- .../chorem/lima/ui/importexport/ImportExport.java | 55 +++-- .../org/chorem/lima/ui/lettering/LetteringView.css | 6 +- .../chorem/lima/ui/vatchart/VatChartImportForm.css | 35 +-- .../lima/ui/vatchart/VatChartImportForm.jaxx | 84 +++---- .../lima/ui/vatchart/VatChartMovementForm.css | 29 ++- .../lima/ui/vatchart/VatChartMovementForm.jaxx | 59 +++-- .../lima/ui/vatchart/VatChartViewHandler.java | 7 +- .../java/org/chorem/lima/util/ReportDialogView.css | 5 +- .../org/chorem/lima/util/ReportDialogView.jaxx | 2 +- .../resources/i18n/lima-swing_en_GB.properties | 13 +- .../resources/i18n/lima-swing_fr_FR.properties | 49 ++-- .../src/main/resources/icons/action-cancel.png | Bin 0 -> 587 bytes ...{action-account-remove.png => action-close.png} | Bin .../src/main/resources/icons/action-closeTab.png | Bin 3140 -> 0 bytes lima-swing/src/main/resources/icons/action-ok.png | Bin 0 -> 537 bytes 60 files changed, 1002 insertions(+), 865 deletions(-) create mode 100644 lima-swing/src/main/resources/icons/action-cancel.png copy lima-swing/src/main/resources/icons/{action-account-remove.png => action-close.png} (100%) delete mode 100644 lima-swing/src/main/resources/icons/action-closeTab.png create mode 100644 lima-swing/src/main/resources/icons/action-ok.png -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1207 in repository lima. See http://git.chorem.org/lima.git commit ead303aaceb60840e697504d95a6515412b6a714 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Mar 21 00:32:12 2015 +0100 refs #1207 : correction d'erreurs criticals --- .../lima/report/service/DocumentService.java | 48 +++++++++++----------- .../java/org/chorem/lima/server/LimaServer.java | 2 +- .../org/chorem/lima/enums/ImportExportEnum.java | 4 -- .../lima/ui/entrybook/EntryBookViewHandler.java | 11 +++-- 4 files changed, 31 insertions(+), 34 deletions(-) diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index 2fe3fce..b85a78b 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -22,17 +22,9 @@ package org.chorem.lima.report.service; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.net.URL; -import java.text.DecimalFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - +import com.google.common.base.Strings; +import com.google.common.collect.Lists; +import net.sf.jasperreports.engine.JasperReport; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -58,10 +50,16 @@ import org.chorem.lima.report.DocumentsEnum; import org.chorem.lima.report.LimaReportConfig; import org.nuiton.util.FileUtil; -import com.google.common.base.Strings; -import com.google.common.collect.Lists; - -import net.sf.jasperreports.engine.JasperReport; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.net.URL; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; import static org.nuiton.i18n.I18n.t; @@ -440,13 +438,13 @@ public class DocumentService { return subTitle; } - protected String constructTableHeader(String[] columnsNames) { - String header = "\t\t<thead>\n\t\t\t<tr>\n"; + protected String constructTableHeader(String... columnsNames) { + StringBuilder builder = new StringBuilder("\t\t<thead>\n\t\t\t<tr>\n"); for (String name : columnsNames) { - header += "\t\t\t\t<th>" + name + "</th>\n"; + builder.append("\t\t\t\t<th>").append(name).append("</th>\n"); } - header += "\t\t\t</tr>\t\t\n</thead>\n"; - return header; + builder.append("\t\t\t</tr>\t\t\n</thead>\n"); + return builder.toString(); } protected String constructTableLine(String[] cells, boolean even) { @@ -459,13 +457,13 @@ public class DocumentService { return line; } - protected String constructTableLine(String[] cells) { - String line = "\t\t<tr>\n"; + protected String constructTableLine(String... cells) { + StringBuilder builder = new StringBuilder("\t\t<tr>\n"); for (String cell : cells) { - line += "\t\t\t<td>" + cell + "</td>\n"; + builder.append("\t\t\t<td>").append(cell).append("</td>\n"); } - line += "\t\t</tr>\n"; - return line; + builder.append("\t\t</tr>\n"); + return builder.toString(); } protected String constructHeaderTitle(String title, Date beginDate, Date endDate) { diff --git a/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java b/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java index a2aa1b2..d1f35ad 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java +++ b/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java @@ -76,7 +76,7 @@ public class LimaServer { LimaServerConfig.getInstance().getConfig().saveForUser(); // block main otherwize, main will end - synchronized (properties) { + synchronized (LimaServer.class) { try { properties.wait(); } catch (InterruptedException e) { diff --git a/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java b/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java index a7b4a1f..2d9aa4a 100644 --- a/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java +++ b/lima-swing/src/main/java/org/chorem/lima/enums/ImportExportEnum.java @@ -82,10 +82,6 @@ import java.net.URL; } } - if (result == null) { - throw new LimaTechnicalException(String.format("Could not load file: %s", filePAth)); - } - return result; } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java index 3236d79..a9cf069 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java @@ -25,6 +25,7 @@ package org.chorem.lima.ui.entrybook; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaSwingConfig; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.EntryBookService; import org.chorem.lima.business.api.ImportService; @@ -32,14 +33,17 @@ import org.chorem.lima.business.exceptions.AlreadyExistEntryBookException; import org.chorem.lima.business.exceptions.UsedEntryBookException; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.EntryBookImpl; -import org.chorem.lima.enums.EntryBooksChartEnum; import org.chorem.lima.enums.ImportExportEnum; -import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.ui.importexport.ImportExport; import org.chorem.lima.util.ErrorHelper; import org.jdesktop.swingx.JXTable; -import javax.swing.*; +import javax.swing.AbstractAction; +import javax.swing.ActionMap; +import javax.swing.InputMap; +import javax.swing.JComponent; +import javax.swing.JOptionPane; +import javax.swing.KeyStroke; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; @@ -286,7 +290,6 @@ public class EntryBookViewHandler implements ServiceListener { // if action confirmed if (value != null) { - EntryBooksChartEnum defaultEntryBooksEnum = (EntryBooksChartEnum) value; ImportExport importExport = new ImportExport(view); importExport.importExport(ImportExportEnum.CSV_ENTRYBOOKS_IMPORT, null, null, true); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1207 in repository lima. See http://git.chorem.org/lima.git commit a0b7cbf7ffd4eb5a24d035627ded995a73ee1acb Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Mar 21 01:32:19 2015 +0100 refs #1207 corrections d'erreurs majeures --- .../chorem/lima/business/ImportExportResults.java | 2 +- .../business/api/FinancialStatementService.java | 4 +- .../business/api/FinancialTransactionService.java | 6 +- .../lima/business/exceptions/AccountException.java | 7 +- ...> AlreadyExistFinancialStatementException.java} | 8 +- .../AlreadyExistVatStatementException.java | 4 +- .../ClosedPeriodicEntryBookException.java | 2 +- .../ClosedPeriodicEntryBooksException.java | 2 +- .../lima/business/exceptions/DateException.java | 2 +- .../lima/business/exceptions/EntriesException.java | 2 +- .../business/exceptions/EntryBookException.java | 2 +- .../exceptions/FinancialPeriodException.java | 2 +- .../exceptions/FinancialTransactionsException.java | 2 +- .../business/exceptions/FiscalPeriodException.java | 2 +- .../business/exceptions/ImportFileException.java | 2 +- .../MoreOneUnlockFiscalPeriodException.java | 9 +- .../exceptions/NotAllowedLabelException.java | 2 +- .../UnbalancedFinancialTransactionsException.java | 3 - .../business/utils/FinancialPeriodComparator.java | 4 - .../ejb/FinancialTransactionServiceImpl.java | 18 +-- .../ejb/report/BalanceReportServiceImpl.java | 24 +-- .../lima/business/utils/EntryEBPComparator.java | 7 +- .../utils/FinancialTransactionComparator.java | 42 ------ .../org/chorem/lima/entity/AccountTopiaDao.java | 2 +- .../org/chorem/lima/business/AccountDaoTest.java | 7 +- .../lima/business/EntryBookServiceImplTest.java | 3 +- .../lima/business/ImportExportServiceTest.java | 2 +- .../lima/business/ReportServiceImplTest.java | 2 +- .../lima/beans/AbstractBigDecimalCondition.java | 2 +- .../chorem/lima/beans/AbstractStringCondition.java | 2 +- .../java/org/chorem/lima/beans/DateCondition.java | 2 +- .../java/org/chorem/lima/report/DocumentsEnum.java | 2 +- .../lima/report/service/DocumentService.java | 8 +- .../java/org/chorem/lima/server/FormatsEnum.java | 2 +- .../java/org/chorem/lima/server/LimaServer.java | 13 +- .../chorem/lima/LimaSwingApplicationContext.java | 6 +- .../main/java/org/chorem/lima/LimaSwingConfig.java | 25 ++- .../java/org/chorem/lima/enums/EncodingEnum.java | 13 +- .../AccountCondition/AccountConditionHandler.java | 4 - .../BigDecimalConditionHandler.java | 4 - .../chorem/lima/ui/Filter/ConditionHandler.java | 6 +- .../EntryBookConditionHandler.java | 8 +- .../StringCondition/StringConditionHandler.java | 7 - .../Filter/dateCondition/DateConditionHandler.java | 7 - .../DateIntervalConditionHandler.java | 7 - .../FinancialPeriodConditionHandler.java | 11 +- .../FiscalPeriodConditionHandler.java | 8 +- .../java/org/chorem/lima/ui/LimaRendererUtil.java | 8 +- .../java/org/chorem/lima/ui/MainViewHandler.java | 3 +- .../chorem/lima/ui/account/AccountViewHandler.java | 2 +- .../ui/celleditor/AutoCompleteTableCellEditor.java | 2 +- .../lima/ui/celleditor/DateTableCellEditor.java | 11 +- .../lima/ui/celleditor/EmptyCellRenderer.java | 4 - .../lima/ui/combobox/AccountComboBoxModel.java | 10 +- .../lima/ui/combobox/EntryBookComboBoxModel.java | 3 - .../ui/combobox/FinancialPeriodComboBoxModel.java | 167 --------------------- .../ui/combobox/FiscalPeriodComboBoxModel.java | 12 +- .../lima/ui/combobox/LeafAccountComboBoxModel.java | 2 - .../lima/ui/combobox/LetterComboBoxModel.java | 100 ------------ .../chorem/lima/ui/common/IntervalListener.java | 29 ---- .../chorem/lima/ui/common/TableModelWithGroup.java | 14 -- .../FinancialTransactionDefaultTable.java | 9 +- .../FinancialTransactionViewHandler.java | 2 +- .../FinancialTransactionSearchViewHandler.java | 14 +- .../ui/fiscalperiod/FiscalPeriodTableModel.java | 4 - .../chorem/lima/ui/importexport/ImportExport.java | 6 +- .../org/chorem/lima/ui/lettering/TypeEntry.java | 2 +- .../ui/opening/CreateIdentityPanelHandler.java | 7 +- .../lima/ui/vatchart/VatChartTreeTableModel.java | 6 +- .../lima/ui/vatchart/VatChartViewHandler.java | 15 +- .../java/org/chorem/lima/util/ErrorHelper.java | 19 --- 71 files changed, 138 insertions(+), 624 deletions(-) diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/ImportExportResults.java b/lima-business-api/src/main/java/org/chorem/lima/business/ImportExportResults.java index da6b9eb..7341b55 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/ImportExportResults.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/ImportExportResults.java @@ -37,7 +37,7 @@ public class ImportExportResults implements Serializable{ List<ExportResult> exportResults; - boolean errors = false; + protected boolean errors; public List<ImportResult> getImportResults() { return importResults; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java index a24f032..d5a21bc 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java @@ -23,7 +23,7 @@ package org.chorem.lima.business.api; import org.chorem.lima.beans.FinancialStatementAmounts; -import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatement; +import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatementException; import org.chorem.lima.business.exceptions.LimaException; import org.chorem.lima.business.exceptions.NotAllowedLabelException; import org.chorem.lima.entity.Account; @@ -43,7 +43,7 @@ public interface FinancialStatementService { FinancialStatement createMasterFinacialStatements(FinancialStatement masterFinancialStatements); FinancialStatement createFinancialStatement(FinancialStatement masterFinancialStatement, - FinancialStatement financialStatement) throws AlreadyExistFinancialStatement, NotAllowedLabelException; + FinancialStatement financialStatement) throws AlreadyExistFinancialStatementException, NotAllowedLabelException; FinancialStatement updateFinancialStatement(FinancialStatement financialStatement); diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java b/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java index da82273..c53130b 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java @@ -111,11 +111,11 @@ public interface FinancialTransactionService { * From to selected entries, create one with same account and * difference between the amounts, and another one with * account 658 or 758 and an amount conversely of the first created - * @param FirstEntrySelected first entry selected - * @param SecondEntrySelected second entry selected + * @param firstEntrySelected first entry selected + * @param secondEntrySelected second entry selected * @return table of the two new entries * */ - Entry[] getEntriesFromEqualizing(Entry FirstEntrySelected, Entry SecondEntrySelected) + Entry[] getEntriesFromEqualizing(Entry firstEntrySelected, Entry secondEntrySelected) throws LockedFinancialPeriodException, LockedEntryBookException; /** diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AccountException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AccountException.java index 6bbe741..63d373a 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AccountException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AccountException.java @@ -27,7 +27,7 @@ package org.chorem.lima.business.exceptions; */ public abstract class AccountException extends LimaException { - protected String accountNumber; + private final String accountNumber; public AccountException(String accountNumber) { this.accountNumber = accountNumber; @@ -43,11 +43,6 @@ public abstract class AccountException extends LimaException { this.accountNumber = accountNumber; } - public AccountException(String accountNumber, String message, Throwable cause) { - super(message, cause); - this.accountNumber = accountNumber; - } - public String getAccountNumber() { return accountNumber; } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistFinancialStatement.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistFinancialStatementException.java similarity index 82% rename from lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistFinancialStatement.java rename to lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistFinancialStatementException.java index d118eca..af073bf 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistFinancialStatement.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistFinancialStatementException.java @@ -25,13 +25,13 @@ package org.chorem.lima.business.exceptions; /** * Created by davidcosse on 28/07/14. */ -public class AlreadyExistFinancialStatement extends LimaException { +public class AlreadyExistFinancialStatementException extends LimaException { private static final long serialVersionUID = 4816249386192290272L; - protected String financialStatementLabel; - protected String masterLabel; + private final String financialStatementLabel; + private final String masterLabel; - public AlreadyExistFinancialStatement(String label, String masterLabel) { + public AlreadyExistFinancialStatementException(String label, String masterLabel) { this.financialStatementLabel = label; this.masterLabel = masterLabel; } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistVatStatementException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistVatStatementException.java index 5de1447..cc848d0 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistVatStatementException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/AlreadyExistVatStatementException.java @@ -28,8 +28,8 @@ package org.chorem.lima.business.exceptions; public class AlreadyExistVatStatementException extends LimaException { private static final long serialVersionUID = 4816249386192290272L; - protected String vatStatementLabel; - protected String masterLabel; + private final String vatStatementLabel; + private final String masterLabel; public AlreadyExistVatStatementException(String label, String masterLabel) { this.vatStatementLabel = label; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBookException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBookException.java index 49b5f97..81d03e2 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBookException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBookException.java @@ -29,7 +29,7 @@ import org.chorem.lima.entity.ClosedPeriodicEntryBook; */ public abstract class ClosedPeriodicEntryBookException extends LimaException { - protected ClosedPeriodicEntryBook closedPeriodicEntryBook; + private final ClosedPeriodicEntryBook closedPeriodicEntryBook; public ClosedPeriodicEntryBookException(ClosedPeriodicEntryBook closedPeriodicEntryBook) { this.closedPeriodicEntryBook = closedPeriodicEntryBook; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBooksException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBooksException.java index 652035d..29d03b1 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBooksException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ClosedPeriodicEntryBooksException.java @@ -31,7 +31,7 @@ import java.util.Collection; */ public abstract class ClosedPeriodicEntryBooksException extends LimaException { - protected Collection<ClosedPeriodicEntryBook> closedPeriodicEntryBooks; + private final Collection<ClosedPeriodicEntryBook> closedPeriodicEntryBooks; public ClosedPeriodicEntryBooksException(Collection<ClosedPeriodicEntryBook> closedPeriodicEntryBooks) { this.closedPeriodicEntryBooks = closedPeriodicEntryBooks; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/DateException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/DateException.java index c2fe536..e1d41d8 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/DateException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/DateException.java @@ -29,7 +29,7 @@ import java.util.Date; */ public abstract class DateException extends LimaException { - protected Date date; + private final Date date; public DateException(Date date) { this.date = date; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntriesException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntriesException.java index 0c979fd..5f339f8 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntriesException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntriesException.java @@ -31,7 +31,7 @@ import java.util.Collection; */ public abstract class EntriesException extends LimaException { - protected Collection<Entry> entries; + private final Collection<Entry> entries; public EntriesException(Collection<Entry> entries) { this.entries = entries; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntryBookException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntryBookException.java index 9ada37e..6a5de3f 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntryBookException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/EntryBookException.java @@ -30,7 +30,7 @@ import org.chorem.lima.entity.EntryBook; public abstract class EntryBookException extends LimaException { private static final long serialVersionUID = 7340316212015035903L; - protected EntryBook entryBook; + private final EntryBook entryBook; public EntryBookException(EntryBook entryBook) { this.entryBook = entryBook; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialPeriodException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialPeriodException.java index 124853e..45a4f6a 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialPeriodException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialPeriodException.java @@ -30,7 +30,7 @@ import org.chorem.lima.entity.FinancialPeriod; public abstract class FinancialPeriodException extends LimaException { private static final long serialVersionUID = 1641125531069733891L; - protected FinancialPeriod financialPeriod; + private final FinancialPeriod financialPeriod; public FinancialPeriodException(FinancialPeriod financialPeriod) { this.financialPeriod = financialPeriod; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialTransactionsException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialTransactionsException.java index 2c71f27..6fffc1a 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialTransactionsException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FinancialTransactionsException.java @@ -31,7 +31,7 @@ import java.util.Collection; */ public abstract class FinancialTransactionsException extends LimaException { - protected Collection<FinancialTransaction> financialTransactions; + private final Collection<FinancialTransaction> financialTransactions; public FinancialTransactionsException(Collection<FinancialTransaction> financialTransactions) { this.financialTransactions = financialTransactions; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FiscalPeriodException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FiscalPeriodException.java index c9dd3f3..907d0e8 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FiscalPeriodException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/FiscalPeriodException.java @@ -29,7 +29,7 @@ import org.chorem.lima.entity.FiscalPeriod; */ public abstract class FiscalPeriodException extends LimaException { - protected FiscalPeriod fiscalPeriod; + private final FiscalPeriod fiscalPeriod; public FiscalPeriodException(FiscalPeriod fiscalPeriod) { this.fiscalPeriod = fiscalPeriod; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ImportFileException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ImportFileException.java index 75fe981..3d1dc87 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ImportFileException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/ImportFileException.java @@ -28,7 +28,7 @@ package org.chorem.lima.business.exceptions; public class ImportFileException extends LimaException { private static final long serialVersionUID = 3498049458931759768L; - protected String detailMessage; + private final String detailMessage; public ImportFileException(String detailMessage) { this.detailMessage = detailMessage; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/MoreOneUnlockFiscalPeriodException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/MoreOneUnlockFiscalPeriodException.java index 6f403c9..75dd040 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/MoreOneUnlockFiscalPeriodException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/MoreOneUnlockFiscalPeriodException.java @@ -30,10 +30,11 @@ import java.util.Date; public class MoreOneUnlockFiscalPeriodException extends LimaException { private static final long serialVersionUID = -9215191603583397411L; - Date beginDate; - Date endDate; - Boolean isLocked; - long countUnlockFiscalPeriod; + + private Date beginDate; + private Date endDate; + private Boolean isLocked; + private long countUnlockFiscalPeriod; public MoreOneUnlockFiscalPeriodException(Date beginDate, Date endDate, Boolean isLocked, long countUnlockFiscalPeriod) { this.beginDate = beginDate; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/NotAllowedLabelException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/NotAllowedLabelException.java index e1487fe..0813747 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/NotAllowedLabelException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/NotAllowedLabelException.java @@ -28,7 +28,7 @@ package org.chorem.lima.business.exceptions; public class NotAllowedLabelException extends LimaException { private static final long serialVersionUID = -4092985460788892883L; - protected String label; + private String label; public NotAllowedLabelException(String label) { this.label = label; diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/UnbalancedFinancialTransactionsException.java b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/UnbalancedFinancialTransactionsException.java index 31793e1..dd3209c 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/UnbalancedFinancialTransactionsException.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/exceptions/UnbalancedFinancialTransactionsException.java @@ -37,7 +37,4 @@ public class UnbalancedFinancialTransactionsException extends FinancialTransacti super(financialTransactions); } - public UnbalancedFinancialTransactionsException(Collection<FinancialTransaction> financialTransactions, Throwable cause) { - super(financialTransactions, cause); - } } diff --git a/lima-business-api/src/main/java/org/chorem/lima/business/utils/FinancialPeriodComparator.java b/lima-business-api/src/main/java/org/chorem/lima/business/utils/FinancialPeriodComparator.java index 88b089c..4a1c1aa 100644 --- a/lima-business-api/src/main/java/org/chorem/lima/business/utils/FinancialPeriodComparator.java +++ b/lima-business-api/src/main/java/org/chorem/lima/business/utils/FinancialPeriodComparator.java @@ -21,8 +21,6 @@ */ package org.chorem.lima.business.utils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.entity.ClosedPeriodicEntryBook; import java.io.Serializable; @@ -32,8 +30,6 @@ public class FinancialPeriodComparator implements Serializable, Comparator<Close private static final long serialVersionUID = 1L; - private static final Log log = LogFactory.getLog(FinancialPeriodComparator.class); - @Override public int compare(ClosedPeriodicEntryBook o1, ClosedPeriodicEntryBook o2) { if (o1.getFinancialPeriod().getBeginDate().compareTo(o2.getFinancialPeriod().getBeginDate()) == 0) { diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java index ba41e51..52e241a 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java @@ -197,13 +197,13 @@ public class FinancialTransactionServiceImpl extends AbstractLimaService impleme } @Override - public Entry[] getEntriesFromEqualizing(Entry FirstEntrySelected, Entry SecondEntrySelected) + public Entry[] getEntriesFromEqualizing(Entry firstEntrySelected, Entry secondEntrySelected) throws LockedFinancialPeriodException, LockedEntryBookException { Entry newSameAccountEntry = null; Entry newCostOrProductEntry = null; - BigDecimal firstSelectedEntryAmount = FirstEntrySelected.getAmount(); - BigDecimal secondSelectedEntryAmount = SecondEntrySelected.getAmount(); + BigDecimal firstSelectedEntryAmount = firstEntrySelected.getAmount(); + BigDecimal secondSelectedEntryAmount = secondEntrySelected.getAmount(); if ( (firstSelectedEntryAmount.compareTo(BigDecimal.ZERO) != 0 && secondSelectedEntryAmount.compareTo(BigDecimal.ZERO) != 0) && !firstSelectedEntryAmount.equals(secondSelectedEntryAmount)) { @@ -211,8 +211,8 @@ public class FinancialTransactionServiceImpl extends AbstractLimaService impleme /*Calculation of result with it * Tab : 0 : debit * 1 : credit*/ - BigDecimal[] firstEntryDebitCredit = debitCreditCalculation(FirstEntrySelected); - BigDecimal[] secondEntryDebitCredit = debitCreditCalculation(SecondEntrySelected); + BigDecimal[] firstEntryDebitCredit = debitCreditCalculation(firstEntrySelected); + BigDecimal[] secondEntryDebitCredit = debitCreditCalculation(secondEntrySelected); /*Subtraction between debit and credit of first and second selected line*/ BigDecimal firstEntryDebitSubtract = firstEntryDebitCredit[0].subtract(secondEntryDebitCredit[1]); @@ -224,12 +224,12 @@ public class FinancialTransactionServiceImpl extends AbstractLimaService impleme /*Set result in the amount of the new entries*/ if (firstEntryDebitSubtract.compareTo(BigDecimal.ZERO) != 0) { - sameAccountEntry = copyEntryWithoutAmount(FirstEntrySelected); - costOrProductEntry = copyEntryWithoutAmount(FirstEntrySelected); + sameAccountEntry = copyEntryWithoutAmount(firstEntrySelected); + costOrProductEntry = copyEntryWithoutAmount(firstEntrySelected); amountsCalculation(firstEntryDebitSubtract, sameAccountEntry, costOrProductEntry); } else { - sameAccountEntry = copyEntryWithoutAmount(SecondEntrySelected); - costOrProductEntry = copyEntryWithoutAmount(SecondEntrySelected); + sameAccountEntry = copyEntryWithoutAmount(secondEntrySelected); + costOrProductEntry = copyEntryWithoutAmount(secondEntrySelected); amountsCalculation(secondEntryDebitSubtract, sameAccountEntry, costOrProductEntry); } diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java index b9446a5..f4ecd08 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/report/BalanceReportServiceImpl.java @@ -168,14 +168,14 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal * @throws org.nuiton.topia.persistence.TopiaException */ protected BalanceAccount bindAccountToBalanceReportAccount(String mainAccountLabel, Account account, Date beginDate, Date endDate, DecimalFormat bigDecimalFormat) { - BalanceAccount BalanceAccount = new BalanceAccountImpl(); - BalanceAccount.setMainAccountLabel(mainAccountLabel); - BalanceAccount.setFormatter(bigDecimalFormat); + BalanceAccount balanceAccount = new BalanceAccountImpl(); + balanceAccount.setMainAccountLabel(mainAccountLabel); + balanceAccount.setFormatter(bigDecimalFormat); String accountNumber = account.getAccountNumber(); accountNumber = StringUtils.rightPad(accountNumber, ACCOUNT_NUMBER_SIZE - accountNumber.length(), '0'); - BalanceAccount.setAccountNumber(accountNumber); - BalanceAccount.setLabel(account.getLabel()); + balanceAccount.setAccountNumber(accountNumber); + balanceAccount.setLabel(account.getLabel()); EntryTopiaDao entryTopiaDao = getDaoHelper().getEntryDao(); @@ -204,16 +204,16 @@ public class BalanceReportServiceImpl extends AbstractLimaService implements Bal sold = sold.subtract(credit); if (sold.compareTo(BigDecimal.ZERO) == 1) { - BalanceAccount.setSoldeDebit(sold.abs()); - BalanceAccount.setSoldeCredit(BigDecimal.ZERO); + balanceAccount.setSoldeDebit(sold.abs()); + balanceAccount.setSoldeCredit(BigDecimal.ZERO); } else { - BalanceAccount.setSoldeCredit(sold.abs()); - BalanceAccount.setSoldeDebit(BigDecimal.ZERO); + balanceAccount.setSoldeCredit(sold.abs()); + balanceAccount.setSoldeDebit(BigDecimal.ZERO); } - BalanceAccount.setAmountCredit(credit); - BalanceAccount.setAmountDebit(debit); + balanceAccount.setAmountCredit(credit); + balanceAccount.setAmountDebit(debit); - return BalanceAccount; + return balanceAccount; } } diff --git a/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java b/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java index efc17d5..ead402c 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java +++ b/lima-business/src/main/java/org/chorem/lima/business/utils/EntryEBPComparator.java @@ -22,8 +22,6 @@ package org.chorem.lima.business.utils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.EntryEBP; import java.io.Serializable; @@ -32,14 +30,11 @@ import java.util.Date; public class EntryEBPComparator implements Serializable, Comparator<EntryEBP> { - private static final Log log = - LogFactory.getLog(EntryEBPComparator.class); - private static final long serialVersionUID = 1L; @Override public int compare(EntryEBP o1, EntryEBP o2) { - int result = 0; + int result; Date date1 = o1.getDatEcr(); Date date2 = o2.getDatEcr(); result = date1.compareTo(date2); diff --git a/lima-business/src/main/java/org/chorem/lima/business/utils/FinancialTransactionComparator.java b/lima-business/src/main/java/org/chorem/lima/business/utils/FinancialTransactionComparator.java deleted file mode 100644 index 3ee0bc8..0000000 --- a/lima-business/src/main/java/org/chorem/lima/business/utils/FinancialTransactionComparator.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.chorem.lima.business.utils; - -/* - * #%L - * Lima :: business - * %% - * Copyright (C) 2008 - 2013 CodeLutin - * %% - * 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 org.chorem.lima.entity.FinancialTransaction; - -import java.util.Comparator; - -/** - * @author Sylvain Bavencoff <bavencoff@codelutin.com> - */ -public class FinancialTransactionComparator implements Comparator<FinancialTransaction> { - - @Override - public int compare(FinancialTransaction o1, FinancialTransaction o2) { - int result = o1.getTransactionDate().compareTo(o2.getTransactionDate()); - if (result == 0) { - result = o1.getTopiaCreateDate().compareTo(o2.getTopiaCreateDate()); - } - return result; - } -} diff --git a/lima-business/src/main/java/org/chorem/lima/entity/AccountTopiaDao.java b/lima-business/src/main/java/org/chorem/lima/entity/AccountTopiaDao.java index 11cf510..9e64d9d 100644 --- a/lima-business/src/main/java/org/chorem/lima/entity/AccountTopiaDao.java +++ b/lima-business/src/main/java/org/chorem/lima/entity/AccountTopiaDao.java @@ -53,7 +53,7 @@ public class AccountTopiaDao extends AbstractAccountTopiaDao<Account> { // // List<Account> result = findAll(query); - List<Account> result = (List<Account>) findAll(); + List<Account> result = findAll(); Iterator<Account> itAccount = result.iterator(); while (itAccount.hasNext()) { Account acc = itAccount.next(); diff --git a/lima-business/src/test/java/org/chorem/lima/business/AccountDaoTest.java b/lima-business/src/test/java/org/chorem/lima/business/AccountDaoTest.java index 4a5ee0a..b4311d4 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/AccountDaoTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/AccountDaoTest.java @@ -508,15 +508,11 @@ public class AccountDaoTest extends AbstractLimaTest { accountTopiaDao.create(Account.PROPERTY_ACCOUNT_NUMBER, "609"); for (int i = 0 ; i < 10 ; i++ ) { - long before = System.currentTimeMillis(); List<Account> accounts = accountTopiaDao.findAllLeafAccounts(); - long after = System.currentTimeMillis(); -// log.info("temps refactoré:" + (after - before)); // code temporaire non performant en attandant: - long before1 = System.currentTimeMillis(); - List<Account> allAccounts = (List<Account>) accountTopiaDao.findAll(); + List<Account> allAccounts = accountTopiaDao.findAll(); Iterator<Account> itAccount = allAccounts.iterator(); while (itAccount.hasNext()) { Account acc = itAccount.next(); @@ -528,7 +524,6 @@ public class AccountDaoTest extends AbstractLimaTest { } } } - long after1 = System.currentTimeMillis(); // log.info("temps original:" + (after1 - before1)); Assert.assertEquals(allAccounts.size(), accounts.size()); diff --git a/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java b/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java index db4f3e0..104b357 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java @@ -35,7 +35,6 @@ import org.junit.Before; import org.junit.Test; import java.text.ParseException; -import java.util.List; /** * Tests pour la gestion des journaux. @@ -61,7 +60,7 @@ public class EntryBookServiceImplTest extends AbstractLimaTest { */ @Test public void modifyJournalTest() throws LimaException { - List<EntryBook> entryBooks = entryBookService.getAllEntryBooks(); + entryBookService.getAllEntryBooks(); EntryBook entryBook = entryBookService.getEntryBookByCode("jdv"); Assert.assertNotNull(entryBook); Assert.assertEquals(JOURNAL_DES_VENTES, entryBook.getLabel()); diff --git a/lima-business/src/test/java/org/chorem/lima/business/ImportExportServiceTest.java b/lima-business/src/test/java/org/chorem/lima/business/ImportExportServiceTest.java index 92d6e08..23ea2d9 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/ImportExportServiceTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/ImportExportServiceTest.java @@ -500,7 +500,7 @@ public class ImportExportServiceTest extends AbstractLimaTest { Assert.assertEquals(28, result.getNbCreated()); entriesStream.close(); - EntryBook entryBook = entryBookService.getEntryBookByCode("AN"); + entryBookService.getEntryBookByCode("AN"); List<FinancialTransaction> _31JanuaryFinancialTransactions = financialTransactionService.getAllFinancialTransactions(df.parse("January 31, 2010"), df.parse("January 31, 2010")); Assert.assertEquals(3, _31JanuaryFinancialTransactions.size()); diff --git a/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java b/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java index 189048e..36b376b 100644 --- a/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java +++ b/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java @@ -96,7 +96,7 @@ public class ReportServiceImplTest extends AbstractLimaTest { tr1Entry1.setFinancialTransaction(transaction1); tr1Entry1.setDescription("test desc"); tr1Entry1.setVoucher("voucher"); - tr1Entry1 = financialTransactionService.createEntry(tr1Entry1); + financialTransactionService.createEntry(tr1Entry1); Date beginDate = df.parse("April 1, 2012"); Date endDate = df.parse("May 31, 2012"); diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java b/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java index b5e48c2..687e915 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/AbstractBigDecimalCondition.java @@ -56,7 +56,7 @@ public abstract class AbstractBigDecimalCondition implements Condition, Serializ this.operand = operand; } - public static enum Operand implements Labeled { + public enum Operand implements Labeled { EQUAL(t("lima.enum.BigDecimal.operand.equal")), NOT_EQUAL(t("lima.enum.BigDecimal.operand.notequal")), LOWER(t("lima.enum.BigDecimal.operand.lower")), diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java b/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java index b22f9b6..705012c 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/AbstractStringCondition.java @@ -66,7 +66,7 @@ public abstract class AbstractStringCondition implements Condition, Serializable this.sensitiveCase = sensitiveCase; } - public static enum Operand implements Labeled { + public enum Operand implements Labeled { EQUAL(t("lima.enum.string.operand.equal")), NOT_EQUAL(t("lima.string.date.operand.notequal")), BEGIN(t("lima.enum.string.operand.begin")), diff --git a/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java b/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java index c697816..a83fec0 100644 --- a/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java +++ b/lima-callao/src/main/java/org/chorem/lima/beans/DateCondition.java @@ -66,7 +66,7 @@ public class DateCondition implements Condition, Serializable { v.visitDateCondition(this); } - public static enum Operand implements Labeled { + public enum Operand implements Labeled { SAME(t("lima.enum.date.operand.same")), AFTER(t("lima.enum.date.operand.after")), PREVIOUS(t("lima.enum.date.operand.previous")), diff --git a/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java b/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java index a077961..68ea24b 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java +++ b/lima-report/src/main/java/org/chorem/lima/report/DocumentsEnum.java @@ -38,7 +38,7 @@ public enum DocumentsEnum { private final String description; - private DocumentsEnum(String description, String fileName) { + DocumentsEnum(String description, String fileName) { this.description = description; this.fileName = fileName; } diff --git a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java index b85a78b..dea0e41 100644 --- a/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java +++ b/lima-report/src/main/java/org/chorem/lima/report/service/DocumentService.java @@ -449,12 +449,12 @@ public class DocumentService { protected String constructTableLine(String[] cells, boolean even) { String style = even ? "line_even" : "line_odd"; - String line = "\t\t<tr class=\"" + style + "\">\n"; + StringBuilder builder = new StringBuilder("\t\t<tr class=\"" + style + "\">\n"); for (String cell : cells) { - line += "\t\t\t<td>" + cell + "</td>\n"; + builder.append("\t\t\t<td>").append(cell).append("</td>\n"); } - line += "\t\t</tr>\n"; - return line; + builder.append("\t\t</tr>\n"); + return builder.toString(); } protected String constructTableLine(String... cells) { diff --git a/lima-server/src/main/java/org/chorem/lima/server/FormatsEnum.java b/lima-server/src/main/java/org/chorem/lima/server/FormatsEnum.java index b588eb9..59d5568 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/FormatsEnum.java +++ b/lima-server/src/main/java/org/chorem/lima/server/FormatsEnum.java @@ -35,7 +35,7 @@ public enum FormatsEnum { private final String description; - private FormatsEnum(String extension, String mimeType, String description) { + FormatsEnum(String extension, String mimeType, String description) { this.extension = extension; this.mimeType = mimeType; this.description = description; diff --git a/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java b/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java index d1f35ad..8f1eb48 100644 --- a/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java +++ b/lima-server/src/main/java/org/chorem/lima/server/LimaServer.java @@ -33,7 +33,6 @@ import org.nuiton.config.ApplicationConfig; import javax.naming.Context; import javax.naming.NamingException; -import java.util.Properties; /** * Lima server class. @@ -54,6 +53,11 @@ public class LimaServer { protected static HttpServerService httpServerService; /** + * To lock + */ + private static final Object LOCK = new Object(); + + /** * Lima server. * * @param args @@ -68,17 +72,14 @@ public class LimaServer { LimaServerConfig serverConfig = LimaServerConfig.getInstance(accountabilityName); - Properties properties = serverConfig.getFlatOptions(); - properties.put("openejb.embedded.remotable", "true"); - launch(serverConfig.getConfig()); LimaServerConfig.getInstance().getConfig().saveForUser(); // block main otherwize, main will end - synchronized (LimaServer.class) { + synchronized (LOCK) { try { - properties.wait(); + LOCK.wait(); } catch (InterruptedException e) { e.printStackTrace(); } diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaSwingApplicationContext.java b/lima-swing/src/main/java/org/chorem/lima/LimaSwingApplicationContext.java index 4e3cdb0..d4a3c55 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaSwingApplicationContext.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaSwingApplicationContext.java @@ -50,11 +50,11 @@ public class LimaSwingApplicationContext extends DefaultApplicationContext { */ protected static LimaSwingApplicationContext instance; - public static JAXXContextEntryDef<MainView> MAIN_UI_ENTRY_DEF = JAXXUtil.newContextEntryDef("mainUI", MainView.class); + public static final JAXXContextEntryDef<MainView> MAIN_UI_ENTRY_DEF = JAXXUtil.newContextEntryDef("mainUI", MainView.class); - public static JAXXContextEntryDef<DecoratorProvider> DECORATOR_PROVIDER_DEF = JAXXUtil.newContextEntryDef("decoratorProvider", DecoratorProvider.class); + public static final JAXXContextEntryDef<DecoratorProvider> DECORATOR_PROVIDER_DEF = JAXXUtil.newContextEntryDef("decoratorProvider", DecoratorProvider.class); - public static JAXXContextEntryDef<LimaSwingConfig> CONFIG_DEF = JAXXUtil.newContextEntryDef("limaConfig", LimaSwingConfig.class); + public static final JAXXContextEntryDef<LimaSwingConfig> CONFIG_DEF = JAXXUtil.newContextEntryDef("limaConfig", LimaSwingConfig.class); /** * @return <code>true</code> si le context a été initialisé via la méthode diff --git a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java index 4c4f2bb..a90c6fa 100644 --- a/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java +++ b/lima-swing/src/main/java/org/chorem/lima/LimaSwingConfig.java @@ -24,19 +24,16 @@ package org.chorem.lima; import com.google.common.collect.ImmutableSet; import jaxx.runtime.JAXXUtil; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.actions.MiscAction; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.OptionsService; import org.chorem.lima.business.config.LimaConfigOptionDef; import org.chorem.lima.business.utils.BigDecimalToString; -import org.chorem.lima.entity.LimaCallaoEntityEnum; -import org.chorem.lima.business.LimaServiceFactory; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ArgumentsParserException; import org.nuiton.converter.ConverterUtil; -import org.nuiton.topia.persistence.TopiaConfigurationConstants; import org.nuiton.util.version.Version; import org.nuiton.util.version.VersionBuilder; @@ -371,7 +368,7 @@ public class LimaSwingConfig extends ApplicationConfig implements BigDecimalToSt * <p/> * Contains all lima configuration key, with defaut value and * information for jaxx configuration frame ({@link #type}, - * {@link #_transient}, {@link #_final}...) + * {@link #transientState}, {@link #finalState}...) */ public enum Option implements LimaConfigOptionDef { @@ -602,39 +599,39 @@ public class LimaSwingConfig extends ApplicationConfig implements BigDecimalToSt protected final Class<?> type; - protected boolean _transient; + protected boolean transientState; - protected boolean _final; + protected boolean finalState; Option(String key, String label, String description, String defaultValue, - Class<?> type, boolean _transient, boolean _final) { + Class<?> type, boolean transientState, boolean finalState) { this.key = key; this.label = label; this.description = description; this.defaultValue = defaultValue; this.type = type; - this._final = _final; - this._transient = _transient; + this.finalState = finalState; + this.transientState = transientState; } @Override public boolean isFinal() { - return _final; + return finalState; } @Override public void setFinal(boolean _final) { - this._final = _final; + this.finalState = _final; } @Override public boolean isTransient() { - return _transient; + return transientState; } @Override public void setTransient(boolean _transient) { - this._transient = _transient; + this.transientState = _transient; } @Override diff --git a/lima-swing/src/main/java/org/chorem/lima/enums/EncodingEnum.java b/lima-swing/src/main/java/org/chorem/lima/enums/EncodingEnum.java index 85fd18b..364d59a 100644 --- a/lima-swing/src/main/java/org/chorem/lima/enums/EncodingEnum.java +++ b/lima-swing/src/main/java/org/chorem/lima/enums/EncodingEnum.java @@ -32,7 +32,7 @@ public enum EncodingEnum { protected final String description; - private EncodingEnum(String encoding, String description) { + EncodingEnum(String encoding, String description) { this.encoding = encoding; this.description = description; } @@ -55,15 +55,4 @@ public enum EncodingEnum { return descriptions; } - public static EncodingEnum valueOfDescription(String description) { - EncodingEnum value = null; - - for (EncodingEnum encodingEnum : EncodingEnum.values()) { - if (description.equals(encodingEnum.description)) { - value = encodingEnum; - break; - } - } - return value; - } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java index 9fd5cd4..f2f2b49 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/AccountCondition/AccountConditionHandler.java @@ -22,8 +22,6 @@ package org.chorem.lima.ui.Filter.AccountCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.AccountCondition; import org.chorem.lima.entity.Account; import org.chorem.lima.ui.Filter.ConditionHandler; @@ -36,8 +34,6 @@ import java.awt.event.ItemEvent; */ public class AccountConditionHandler implements ConditionHandler { - private static final Log log = LogFactory.getLog(AccountConditionHandler.class); - protected AccountCondition condition; protected AccountConditionView view; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/BigDecimalConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/BigDecimalConditionHandler.java index 91455db..e8c3f14 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/BigDecimalConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/BigDecimalCondition/BigDecimalConditionHandler.java @@ -22,8 +22,6 @@ package org.chorem.lima.ui.Filter.BigDecimalCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.AbstractBigDecimalCondition; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.DebitCondition; @@ -38,8 +36,6 @@ import java.math.BigDecimal; */ public class BigDecimalConditionHandler implements ConditionHandler { - private static final Log log = LogFactory.getLog(BigDecimalConditionHandler.class); - protected BigDecimalConditionView view; protected AbstractBigDecimalCondition condition; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/ConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/ConditionHandler.java index 5dbf4ec..83144df 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/ConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/ConditionHandler.java @@ -32,9 +32,9 @@ import javax.swing.*; */ public interface ConditionHandler { - public Condition getCondition(); + Condition getCondition(); - public JInternalFrame getView(); + JInternalFrame getView(); - public void setFilterHandler(FinancialTransactionConditionHandler filterHandler); + void setFilterHandler(FinancialTransactionConditionHandler filterHandler); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/EntryBookCondition/EntryBookConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/EntryBookCondition/EntryBookConditionHandler.java index a212521..5dbebec 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/EntryBookCondition/EntryBookConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/EntryBookCondition/EntryBookConditionHandler.java @@ -22,17 +22,15 @@ package org.chorem.lima.ui.Filter.EntryBookCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.EntryBookCondition; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.EntryBookService; import org.chorem.lima.entity.EntryBook; -import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.ui.Filter.ConditionHandler; import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransactionConditionHandler; -import javax.swing.*; +import javax.swing.JList; import javax.swing.event.ListSelectionEvent; import java.util.List; @@ -41,8 +39,6 @@ import java.util.List; */ public class EntryBookConditionHandler implements ConditionHandler { - private static final Log log = LogFactory.getLog(EntryBookConditionHandler.class); - protected EntryBookConditionView view; protected EntryBookCondition condition; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/StringConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/StringConditionHandler.java index 2d6e25c..4983cda 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/StringConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/StringCondition/StringConditionHandler.java @@ -22,14 +22,11 @@ package org.chorem.lima.ui.Filter.StringCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.AbstractStringCondition; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.VoucherCondition; import org.chorem.lima.ui.Filter.ConditionHandler; import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransactionConditionHandler; -import org.chorem.lima.ui.financialtransactionsearch.FinancialTransactionSearchViewHandler; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; @@ -40,10 +37,6 @@ import java.awt.event.KeyEvent; */ public class StringConditionHandler implements ConditionHandler { - /** log. */ - private static final Log log = - LogFactory.getLog(FinancialTransactionSearchViewHandler.class); - protected StringConditionView view; protected AbstractStringCondition condition; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java index 34a66a3..322b7e8 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateCondition/DateConditionHandler.java @@ -22,13 +22,10 @@ package org.chorem.lima.ui.Filter.dateCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.DateCondition; import org.chorem.lima.ui.Filter.ConditionHandler; import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransactionConditionHandler; -import org.chorem.lima.ui.financialtransactionsearch.FinancialTransactionSearchViewHandler; import java.awt.event.ItemEvent; import java.text.DateFormat; @@ -40,10 +37,6 @@ import java.util.Date; */ public class DateConditionHandler implements ConditionHandler { - /** log. */ - private static final Log log = - LogFactory.getLog(FinancialTransactionSearchViewHandler.class); - protected DateConditionView view; protected DateCondition condition; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java index bc31329..80eb2e5 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/dateIntervalCondition/DateIntervalConditionHandler.java @@ -22,13 +22,10 @@ package org.chorem.lima.ui.Filter.dateIntervalCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.DateIntervalCondition; import org.chorem.lima.ui.Filter.ConditionHandler; import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransactionConditionHandler; -import org.chorem.lima.ui.financialtransactionsearch.FinancialTransactionSearchViewHandler; import java.text.DateFormat; import java.text.SimpleDateFormat; @@ -39,10 +36,6 @@ import java.util.Date; */ public class DateIntervalConditionHandler implements ConditionHandler { - /** log. */ - private static final Log log = - LogFactory.getLog(FinancialTransactionSearchViewHandler.class); - protected DateIntervalConditionView view; protected DateIntervalCondition condition; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/financialPeriodCondition/FinancialPeriodConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/financialPeriodCondition/FinancialPeriodConditionHandler.java index 5b2abf0..0fbaff9 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/financialPeriodCondition/FinancialPeriodConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/financialPeriodCondition/FinancialPeriodConditionHandler.java @@ -22,18 +22,15 @@ package org.chorem.lima.ui.Filter.financialPeriodCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.FinancialPeriodCondition; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.FinancialPeriodService; import org.chorem.lima.entity.FinancialPeriod; -import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.ui.Filter.ConditionHandler; import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransactionConditionHandler; -import org.chorem.lima.ui.financialtransactionsearch.FinancialTransactionSearchViewHandler; -import javax.swing.*; +import javax.swing.JList; import javax.swing.event.ListSelectionEvent; import java.util.List; @@ -42,10 +39,6 @@ import java.util.List; */ public class FinancialPeriodConditionHandler implements ConditionHandler { - /** log. */ - private static final Log log = - LogFactory.getLog(FinancialTransactionSearchViewHandler.class); - protected FinancialPeriodConditionView view; protected FinancialPeriodCondition condition; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/fiscalPeriodCondition/FiscalPeriodConditionHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/fiscalPeriodCondition/FiscalPeriodConditionHandler.java index d8f74c3..59496d5 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/Filter/fiscalPeriodCondition/FiscalPeriodConditionHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/Filter/fiscalPeriodCondition/FiscalPeriodConditionHandler.java @@ -22,17 +22,15 @@ package org.chorem.lima.ui.Filter.fiscalPeriodCondition; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.Condition; import org.chorem.lima.beans.FiscalPeriodCondition; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.FiscalPeriodService; import org.chorem.lima.entity.FiscalPeriod; -import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.ui.Filter.ConditionHandler; import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransactionConditionHandler; -import javax.swing.*; +import javax.swing.JList; import javax.swing.event.ListSelectionEvent; import java.util.List; @@ -42,8 +40,6 @@ import java.util.List; */ public class FiscalPeriodConditionHandler implements ConditionHandler { - private static final Log log = LogFactory.getLog(FiscalPeriodConditionHandler.class); - protected FiscalPeriodConditionView view; protected FiscalPeriodCondition condition; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/LimaRendererUtil.java b/lima-swing/src/main/java/org/chorem/lima/ui/LimaRendererUtil.java index f69121e..38e2f58 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/LimaRendererUtil.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/LimaRendererUtil.java @@ -22,12 +22,11 @@ package org.chorem.lima.ui; import jaxx.runtime.swing.renderer.DecoratorListCellRenderer; -import jaxx.runtime.swing.renderer.DecoratorProviderListCellRenderer; import org.chorem.lima.LimaSwingApplicationContext; import org.nuiton.decorator.Decorator; import org.nuiton.decorator.DecoratorProvider; -import javax.swing.*; +import javax.swing.ListCellRenderer; /** * Helper class to deal with renderers. @@ -37,11 +36,6 @@ import javax.swing.*; */ public class LimaRendererUtil { - public static ListCellRenderer newDecoratorProviderListCellRenderer() { - DecoratorProvider decoratorProvider = LimaSwingApplicationContext.get().getDecoratorProvider(); - return new DecoratorProviderListCellRenderer(decoratorProvider); - } - public static ListCellRenderer newDecoratorListCellRenderer(Class<?> type) { DecoratorProvider decoratorProvider = LimaSwingApplicationContext.get().getDecoratorProvider(); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java index 6612a25..2012972 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java @@ -29,6 +29,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaSwingApplicationContext; import org.chorem.lima.LimaSwingConfig; +import org.chorem.lima.LimaTechnicalException; import org.chorem.lima.business.api.OptionsService; import org.chorem.lima.enums.ImportExportEnum; import org.chorem.lima.business.LimaServiceFactory; @@ -276,7 +277,7 @@ public class MainViewHandler { try { DesktopUtil.browse(siteURL.toURI()); } catch (Exception e) { - throw new RuntimeException("Can't open lima website at " + siteURL, e); + throw new LimaTechnicalException("Can't open lima website at " + siteURL, e); } } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java index 9dc3d91..3510a61 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java @@ -272,7 +272,7 @@ public class AccountViewHandler implements ServiceListener { List<MutableTreeTableNode> nodesToMove = findSubNodes(node, newAccount.getAccountNumber()); for (MutableTreeTableNode nodeToMove : nodesToMove) { - model.removeNodeFromParent((MutableTreeTableNode)nodeToMove); + model.removeNodeFromParent(nodeToMove); newNode.add(nodeToMove); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java index 08e7942..0c2341d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java @@ -34,7 +34,7 @@ import java.util.Map; */ public class AutoCompleteTableCellEditor extends StringTableCellEditor { - protected static Map<String, List<String>> precedingValuesById = Maps.newHashMap(); + protected static final Map<String, List<String>> precedingValuesById = Maps.newHashMap(); List<String> precedingValues; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java index 5a5d334..7d1bb6f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/DateTableCellEditor.java @@ -29,11 +29,14 @@ import org.chorem.lima.LimaSwingApplicationContext; import org.chorem.lima.LimaSwingConfig; import org.jdesktop.swingx.JXDatePicker; -import javax.swing.*; +import javax.swing.AbstractCellEditor; +import javax.swing.JFormattedTextField; +import javax.swing.JTable; +import javax.swing.SwingUtilities; import javax.swing.event.AncestorEvent; import javax.swing.event.AncestorListener; import javax.swing.table.TableCellEditor; -import java.awt.*; +import java.awt.Component; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.text.DateFormat; @@ -86,7 +89,9 @@ public class DateTableCellEditor extends AbstractCellEditor try { datePicker.commitEdit(); } catch (ParseException e) { - e.printStackTrace(); + if (log.isErrorEnabled()) { + log.error("Could not commit date editor value", e); + } } Calendar calendar = Calendar.getInstance(); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EmptyCellRenderer.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EmptyCellRenderer.java index caaad9f..522b880 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EmptyCellRenderer.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/EmptyCellRenderer.java @@ -45,10 +45,6 @@ public class EmptyCellRenderer extends DefaultTableCellRenderer { /** serialVersionUID. */ private static final long serialVersionUID = -7834417406160620726L; - public EmptyCellRenderer() { - - } - public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java index 2f100c2..9e59ec7 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java @@ -22,15 +22,14 @@ package org.chorem.lima.ui.combobox; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.Account; -import org.chorem.lima.business.LimaServiceFactory; -import javax.swing.*; +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; import java.util.List; /** Account combo box model. */ @@ -39,9 +38,6 @@ public class AccountComboBoxModel extends AbstractListModel implements ComboBoxM private static final long serialVersionUID = 1L; - private static final Log log = - LogFactory.getLog(AccountComboBoxModel.class); - protected Object selectedAccount; protected List<Account> datasCache; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java index aa0313a..ddc2a84 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java @@ -46,9 +46,6 @@ public class EntryBookComboBoxModel extends AbstractListModel implements ComboBo private static final long serialVersionUID = 1L; - private static final Log log = - LogFactory.getLog(EntryBookComboBoxModel.class); - protected Object selectedEntryBook; protected EntryBookService entryBookService; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java deleted file mode 100644 index 16f2ce8..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric - * %% - * 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% - */ - -package org.chorem.lima.ui.combobox; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.api.FinancialPeriodService; -import org.chorem.lima.business.api.FiscalPeriodService; -import org.chorem.lima.business.api.ImportService; -import org.chorem.lima.entity.FinancialPeriod; -import org.chorem.lima.entity.FiscalPeriod; -import org.chorem.lima.business.LimaServiceFactory; - -import javax.swing.*; -import java.util.List; - -/** - * Opened financial period combo box model. - * - * @author chatellier - * @version $Revision$ - * <p/> - * Last update : $Date$ - * By : $Author$ - */ -public class FinancialPeriodComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener { - - private static final long serialVersionUID = 1L; - - private static final Log log = - LogFactory.getLog(FinancialPeriodComboBoxModel.class); - - protected Object selectedFinancialPeriod; - - protected List<FinancialPeriod> datasCache; - - protected FinancialPeriodService financialPeriodService; - - protected FiscalPeriod selectedFiscalPeriod; - - private boolean displayAllPeriods; - - /** Constructor for locked period list. */ - public FinancialPeriodComboBoxModel() { - this(false); - } - - /** - * Constructor for period list. - * - * @param displayAllPeriods if {@code true}, display all available period, otherwize - * display only locked ones - */ - public FinancialPeriodComboBoxModel(boolean displayAllPeriods) { - - this.displayAllPeriods = displayAllPeriods; - - financialPeriodService = - LimaServiceFactory.getService( - FinancialPeriodService.class); - LimaServiceFactory.addServiceListener(FinancialPeriodService.class, this); - LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); - LimaServiceFactory.addServiceListener(ImportService.class, this); - if (displayAllPeriods) { - datasCache = getAllDataList(); - } else { - datasCache = getDataList(); - } - for (FinancialPeriod financialPeriod : datasCache) { - - } - } - - public void setSelectedFiscalPeriod(FiscalPeriod fiscalPeriod) { - selectedFiscalPeriod = fiscalPeriod; - if (displayAllPeriods) { - datasCache = getAllDataList(); - } else { - datasCache = getDataList(); - } - fireContentsChanged(this, 0, datasCache.size()); - } - - @Override - public int getSize() { - return datasCache.size(); - } - - @Override - public Object getElementAt(int index) { - return datasCache.get(index); - } - - @Override - public void setSelectedItem(Object anItem) { - selectedFinancialPeriod = anItem; - } - - @Override - public Object getSelectedItem() { - return selectedFinancialPeriod; - } - - //get unblocked financial periods data list - public List<FinancialPeriod> getDataList() { - List<FinancialPeriod> result = null; - if (selectedFiscalPeriod != null) { - result = financialPeriodService.getFinancialPeriods(selectedFiscalPeriod.getBeginDate(), selectedFiscalPeriod.getEndDate()); - } else { - result = financialPeriodService.getUnblockedFinancialPeriods(); - } - return result; - } - - //get all financial periods data list - public List<FinancialPeriod> getAllDataList() { - List<FinancialPeriod> result = null; - if (selectedFiscalPeriod != null) { - result = financialPeriodService.getFinancialPeriods(selectedFiscalPeriod.getBeginDate(), selectedFiscalPeriod.getEndDate()); - } else { - result = financialPeriodService.getAllFinancialPeriods(); - } - return result; - } - - public void refresh() { - datasCache = getDataList(); - fireContentsChanged(this, 0, datasCache.size()); - } - - public void refreshAll() { - datasCache = getAllDataList(); - fireContentsChanged(this, 0, datasCache.size()); - } - - @Override - public void notifyMethod(String serviceName, String methodeName) { - if (serviceName.contains("Period") || methodeName.contains("importAll")) { - if (displayAllPeriods) { - datasCache = getAllDataList(); - } else { - datasCache = getDataList(); - } - } - } -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java index dc01fc5..2d297db 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java @@ -60,16 +60,6 @@ public class FiscalPeriodComboBoxModel extends AbstractListModel implements Comb } } - //constructor for all fiscal period - public FiscalPeriodComboBoxModel(boolean all) { - fiscalPeriodService = - LimaServiceFactory.getService( - FiscalPeriodService.class); - LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); - LimaServiceFactory.addServiceListener(ImportService.class, this); - datasCache = getAllDataList(); - } - @Override public int getSize() { return datasCache.size(); @@ -88,7 +78,7 @@ public class FiscalPeriodComboBoxModel extends AbstractListModel implements Comb log.debug("Beginning and end dates of first fiscal period : " + ((FiscalPeriod) getElementAt(0)).getBeginDate() + ", " + ((FiscalPeriod) getElementAt(0)).getEndDate()); } - selectedFiscalPeriod = (FiscalPeriod)anItem; + selectedFiscalPeriod = anItem; } @Override diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java index 15df29a..149a76c 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java @@ -42,8 +42,6 @@ public class LeafAccountComboBoxModel extends AbstractListModel implements Combo private static final long serialVersionUID = 1L; - private static final Log log = LogFactory.getLog(LeafAccountComboBoxModel.class); - protected Object selectedAccount; protected List<Account> datasCache; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java deleted file mode 100644 index efe82d0..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.chorem.lima.ui.combobox; -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2008 - 2012 CodeLutin - * %% - * 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 org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.api.FinancialTransactionService; -import org.chorem.lima.business.LimaServiceFactory; - -import javax.swing.*; -import java.util.List; - -/** - * Date: 13/08/12 - * - * @author mallon <mallon@codelutin.com> - * @since 0.6-alpha-2 - */ -public class LetterComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener { - - private static final long serialVersionUID = 1L; - - private static final Log log = - LogFactory.getLog(AccountComboBoxModel.class); - - protected Object selectedAccount; - - protected List<String> datasCache; - - protected FinancialTransactionService financialTransactionService; - - public LetterComboBoxModel() { - financialTransactionService = - LimaServiceFactory.getService(FinancialTransactionService.class); - LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); - datasCache = getDataList(); - } - - @Override - public Object getSelectedItem() { - return selectedAccount; - } - - @Override - public void setSelectedItem(Object anItem) { - selectedAccount = anItem; - fireContentsChanged(this, -1, -1); - } - - - @Override - public Object getElementAt(int index) { - return datasCache.get(index); - } - - @Override - public int getSize() { - return datasCache.size(); - } - - public List<String> getDataList() { - List<String> result = financialTransactionService.getAllLetters(); - return result; - - } - - public void refresh() { - datasCache = getDataList(); - fireContentsChanged(this, 0, datasCache.size()); - } - - @Override - public void notifyMethod(String serviceName, String methodeName) { - if (methodeName.contains("Letter") || - methodeName.contains("importAll")) { - refresh(); - } - } - -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/IntervalListener.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/IntervalListener.java deleted file mode 100644 index 4729919..0000000 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/IntervalListener.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * #%L - * Lima :: Swing - * %% - * Copyright (C) 2012 CodeLutin, Chatellier Eric - * %% - * 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% - */ -package org.chorem.lima.ui.common; - -import java.util.EventListener; -import java.util.EventObject; - -public interface IntervalListener extends EventListener { - public void intervalChanged(EventObject e); -} diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/TableModelWithGroup.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/TableModelWithGroup.java index 2e2a8c7..6371117 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/TableModelWithGroup.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/TableModelWithGroup.java @@ -29,20 +29,6 @@ public abstract class TableModelWithGroup<E> extends AbstractLimaTableModel<E> { private static final long serialVersionUID = 2349944168938847283L; - public int indexGroupAt(int row) { - int countGroup = 0; - E precedingValue = get(0); - for (int precedingRow = 1; precedingRow <= row; precedingRow++) { - E value = get(precedingRow); - if ( ! sameGroup(precedingValue, value)) { - countGroup++; - } - precedingValue = value; - } - return countGroup; - - } - public int indexInGroup(int row) { int index = 0; while (row-index > 0 && sameGroup(get(row), get(row-index-1))) { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionDefaultTable.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionDefaultTable.java index a871e51..9cbe321 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionDefaultTable.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionDefaultTable.java @@ -22,8 +22,6 @@ package org.chorem.lima.ui.financialtransaction; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.ui.celleditor.AccountTableCellRenderer; @@ -36,7 +34,10 @@ import org.chorem.lima.ui.common.AbstractLimaTable; import org.chorem.lima.ui.common.CellRouteHorizontalAction; import org.chorem.lima.ui.common.CellRouteVerticalAction; -import javax.swing.*; +import javax.swing.ActionMap; +import javax.swing.InputMap; +import javax.swing.JComponent; +import javax.swing.KeyStroke; import java.awt.event.KeyEvent; import java.math.BigDecimal; import java.util.Date; @@ -49,8 +50,6 @@ public class FinancialTransactionDefaultTable<H> extends AbstractLimaTable<H> { /** serialVersionUID. */ private static final long serialVersionUID = 3133690382049594727L; - private static final Log log = LogFactory.getLog(FinancialTransactionTable.class); - public FinancialTransactionDefaultTable(H handler) { super(handler); setSortable(false); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java index 44ab57b..f65d248 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java @@ -986,7 +986,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo BigDecimal totalDebit = BigDecimal.ZERO; BigDecimal totalCredit = BigDecimal.ZERO; - BigDecimal balance = BigDecimal.ZERO; + BigDecimal balance; for (Entry entry : tableModel.getValues()) { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java index d0936fb..2b65659 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java @@ -22,11 +22,9 @@ package org.chorem.lima.ui.financialtransactionsearch; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.FinancialTransactionCondition; -import org.chorem.lima.business.api.FinancialTransactionService; import org.chorem.lima.business.LimaServiceFactory; +import org.chorem.lima.business.api.FinancialTransactionService; import org.chorem.lima.ui.Filter.AccountCondition.AccountConditionView; import org.chorem.lima.ui.Filter.BigDecimalCondition.CreditConditionView; import org.chorem.lima.ui.Filter.BigDecimalCondition.DebitConditionView; @@ -43,7 +41,11 @@ import org.chorem.lima.ui.Filter.financialTransactionCondition.FinancialTransact import org.chorem.lima.ui.Filter.fiscalPeriodCondition.FiscalPeriodConditionView; import org.chorem.lima.ui.financialtransaction.FinancialTransactionDefaultTable; -import javax.swing.*; +import javax.swing.AbstractAction; +import javax.swing.ActionMap; +import javax.swing.InputMap; +import javax.swing.JComponent; +import javax.swing.KeyStroke; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; @@ -58,10 +60,6 @@ import java.awt.event.KeyEvent; */ public class FinancialTransactionSearchViewHandler { - /** log. */ - private static final Log log = - LogFactory.getLog(FinancialTransactionSearchViewHandler.class); - protected FinancialTransactionSearchView view; protected FinancialTransactionSearchTableModel tableModel; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java index f550f08..60887dd 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java @@ -22,8 +22,6 @@ package org.chorem.lima.ui.fiscalperiod; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.utils.FiscalPeriodComparator; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.ui.common.AbstractColumn; @@ -47,8 +45,6 @@ public class FiscalPeriodTableModel extends AbstractLimaTableModel<FiscalPeriod> /** serialVersionUID. */ private static final long serialVersionUID = 77027335135838258L; - private static final Log log = LogFactory.getLog(FiscalPeriodTableModel.class); - public FiscalPeriodTableModel() { comparator = new FiscalPeriodComparator(); } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java index 8ab4506..164ec2d 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java @@ -36,7 +36,7 @@ import org.chorem.lima.business.ImportExportResults; import org.chorem.lima.business.ImportResult; import org.chorem.lima.business.api.ExportService; import org.chorem.lima.business.api.ImportService; -import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatement; +import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatementException; import org.chorem.lima.business.exceptions.AlreadyExistVatStatementException; import org.chorem.lima.business.exceptions.BeginAfterEndFiscalPeriodException; import org.chorem.lima.business.exceptions.ImportFileException; @@ -436,8 +436,8 @@ public class ImportExport { result.append(t("lima.fiscalPeriod.error.lockedFinancialPeriod") + "\n"); } else if (importException instanceof LockedEntryBookException) { result.append(t("lima.entryBook.error.lockedEntryBook", ((LockedEntryBookException) importException).getClosedPeriodicEntryBook().getFinancialPeriod().getBeginDate(), ((LockedEntryBookException) importException).getClosedPeriodicEntryBook().getFinancialPeriod().getEndDate()) + "\n"); - } else if (importException instanceof AlreadyExistFinancialStatement) { - result.append(t("lima.financialStatement.error.alreadyExistFinancialStatement", ((AlreadyExistFinancialStatement) importException).getFinancialStatementLabel()) + "\n"); + } else if (importException instanceof AlreadyExistFinancialStatementException) { + result.append(t("lima.financialStatement.error.alreadyExistFinancialStatement", ((AlreadyExistFinancialStatementException) importException).getFinancialStatementLabel()) + "\n"); } else if (importException instanceof AlreadyExistVatStatementException) { result.append(t("lima.vatStatement.error.alreadyExistVatStatement", ((AlreadyExistVatStatementException) importException).getVatStatementLabel()) + "\n"); } else if (importException instanceof NoFiscalPeriodFoundException) { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java index c44fcad..dcd9d8e 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/lettering/TypeEntry.java @@ -39,7 +39,7 @@ public enum TypeEntry { private boolean noLettered; - private TypeEntry(boolean lettered, boolean noLettered) { + TypeEntry(boolean lettered, boolean noLettered) { this.lettered = lettered; this.noLettered = noLettered; } diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java index 5dfe631..fc83caa 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateIdentityPanelHandler.java @@ -22,13 +22,10 @@ package org.chorem.lima.ui.opening; * #L% */ -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.IdentityService; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; -import org.chorem.lima.business.LimaServiceFactory; -import org.chorem.lima.ui.identity.IdentityHandler; /** * @author Sylvain Bavencoff <bavencoff@codelutin.com> @@ -39,8 +36,6 @@ public class CreateIdentityPanelHandler { protected CreateIdentityPanel view; - private static final Log log = LogFactory.getLog(IdentityHandler.class); - public CreateIdentityPanelHandler(CreateIdentityPanel view) { this.view = view; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java index 8b97ba9..847c1d0 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java @@ -79,7 +79,7 @@ public class VatChartTreeTableModel extends AbstractTreeTableModel { @Override public int getChildCount(Object node) { - int result = 0; + int result; if (node == getRoot()) { result = vatStatementService. getChildrenVatStatement(null).size(); @@ -94,7 +94,7 @@ public class VatChartTreeTableModel extends AbstractTreeTableModel { @Override public Object getChild(Object parent, int index) { - Object result = null; + Object result; if (parent == getRoot()) { List<VatStatement> vatStatements = vatStatementService.getChildrenVatStatement(null); @@ -111,7 +111,7 @@ public class VatChartTreeTableModel extends AbstractTreeTableModel { @Override public int getIndexOfChild(Object parent, Object child) { - int result = 0; + int result; if (parent == getRoot()) { List<VatStatement> vatStatements = diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java index a876f34..cc1c383 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java @@ -21,20 +21,22 @@ */ package org.chorem.lima.ui.vatchart; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.ImportService; import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.entity.VatStatement; import org.chorem.lima.entity.VatStatementImpl; import org.chorem.lima.enums.ImportExportEnum; -import org.chorem.lima.enums.VatStatementsChartEnum; -import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.ui.importexport.ImportExport; import org.jdesktop.swingx.JXTreeTable; -import javax.swing.*; +import javax.swing.AbstractAction; +import javax.swing.ActionMap; +import javax.swing.InputMap; +import javax.swing.JComponent; +import javax.swing.JOptionPane; +import javax.swing.KeyStroke; import javax.swing.tree.TreePath; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; @@ -43,9 +45,6 @@ import static org.nuiton.i18n.I18n.t; public class VatChartViewHandler implements ServiceListener { - /** log. */ - private static final Log log = LogFactory.getLog(VatChartViewHandler.class); - protected VatStatementService vatStatementService; protected VatChartView view; diff --git a/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java b/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java index 5547706..8a1a184 100644 --- a/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java +++ b/lima-swing/src/main/java/org/chorem/lima/util/ErrorHelper.java @@ -88,31 +88,12 @@ public class ErrorHelper implements ErrorReporter { * * @param message message for user */ - public void showErrorDialog(String message) { - showErrorDialog(message, null); - } - - /** - * Display a user friendly error frame. - * - * @param message message for user - */ public void showErrorMessage(String message) { JOptionPane.showMessageDialog(null, message, t("lima.error"), JOptionPane.ERROR_MESSAGE); } - /** - * Display a user friendly error frame. - * - * @param message message for user - * @param cause exception cause - */ - public void showErrorDialog(String message, Throwable cause) { - showErrorDialog(null, message, cause); - } - /* * @see org.jdesktop.swingx.error.ErrorReporter#reportError(org.jdesktop.swingx.error.ErrorInfo) */ -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1207 in repository lima. See http://git.chorem.org/lima.git commit 78602e6e7cfe590b4539af03f57d83dd0a72902f Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Mar 21 07:44:17 2015 +0100 refs #1207 corrections d'erreurs majeures --- .../org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java | 6 +++--- .../java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java | 2 -- .../java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java index 0c2341d..09f7f3b 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AutoCompleteTableCellEditor.java @@ -34,16 +34,16 @@ import java.util.Map; */ public class AutoCompleteTableCellEditor extends StringTableCellEditor { - protected static final Map<String, List<String>> precedingValuesById = Maps.newHashMap(); + protected static final Map<String, List<String>> PRECEDING_VALUES_BY_ID = Maps.newHashMap(); List<String> precedingValues; public AutoCompleteTableCellEditor(String id) { - precedingValues = precedingValuesById.get(id); + precedingValues = PRECEDING_VALUES_BY_ID.get(id); if (precedingValues == null) { precedingValues = Lists.newLinkedList(); - precedingValuesById.put(id, precedingValues); + PRECEDING_VALUES_BY_ID.put(id, precedingValues); } AutoCompleteDecorator.decorate(getComponent(), precedingValues, false); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java index ddc2a84..65ef4f0 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java @@ -22,8 +22,6 @@ package org.chorem.lima.ui.combobox; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.EntryBookService; import org.chorem.lima.business.api.ImportService; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java index 149a76c..a8a9e55 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java @@ -22,8 +22,6 @@ package org.chorem.lima.ui.combobox; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.ImportService; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1207 in repository lima. See http://git.chorem.org/lima.git commit 248ce540b90ad1de855962267b56169a84454287 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Apr 24 17:49:49 2015 +0200 rebase to develop (refs #1207) --- .../lima/business/ejb/FinancialStatementServiceImpl.java | 10 +++++----- .../org/chorem/lima/business/ejb/ImportServiceImpl.java | 14 +++++++------- .../FinancialStatementChartTreeTableModel.java | 4 ++-- .../FinancialTransactionSearchViewHandler.java | 1 + .../org/chorem/lima/ui/vatchart/VatChartViewHandler.java | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java index 4fb4cb7..12458ea 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java @@ -40,7 +40,7 @@ import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.api.AccountService; import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.business.api.ReportService; -import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatement; +import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatementException; import org.chorem.lima.business.exceptions.LimaException; import org.chorem.lima.business.exceptions.NotAllowedLabelException; import org.chorem.lima.entity.Account; @@ -80,7 +80,7 @@ public class FinancialStatementServiceImpl extends AbstractLimaService implement } }; - protected void validateNewFinancialStatement(FinancialStatement masterFinancialStatement, FinancialStatement financialStatement) throws AlreadyExistFinancialStatement, NotAllowedLabelException { + protected void validateNewFinancialStatement(FinancialStatement masterFinancialStatement, FinancialStatement financialStatement) throws AlreadyExistFinancialStatementException, NotAllowedLabelException { if (financialStatement.getLabel().contains("/")) { throw new NotAllowedLabelException(financialStatement.getLabel()); } @@ -91,7 +91,7 @@ public class FinancialStatementServiceImpl extends AbstractLimaService implement } Map indexedSubFinancialStatements = Maps.uniqueIndex(masterSubFinancialStatements, GET_LABEL); if (indexedSubFinancialStatements.get(financialStatement.getLabel()) != null){ - throw new AlreadyExistFinancialStatement(financialStatement.getLabel(), masterFinancialStatement.getLabel()); + throw new AlreadyExistFinancialStatementException(financialStatement.getLabel(), masterFinancialStatement.getLabel()); } } } @@ -112,11 +112,11 @@ public class FinancialStatementServiceImpl extends AbstractLimaService implement @Override public FinancialStatement createFinancialStatement(FinancialStatement parentFinancialStatement, - FinancialStatement financialStatement) throws AlreadyExistFinancialStatement, NotAllowedLabelException { + FinancialStatement financialStatement) throws AlreadyExistFinancialStatementException, NotAllowedLabelException { validateNewFinancialStatement(parentFinancialStatement, financialStatement); Preconditions.checkState(parentFinancialStatement.isPersisted(), "parents statement must be persited"); - Preconditions.checkState(! financialStatement.isPersisted(), " statement to create must be not persited"); + Preconditions.checkState(!financialStatement.isPersisted(), " statement to create must be not persited"); FinancialStatementTopiaDao financialStatementTopiaDao = getDaoHelper().getFinancialStatementDao(); diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java index b9d34b6..766b126 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java @@ -54,7 +54,7 @@ import org.chorem.lima.business.ejb.ebp.EntryBookEBPModel; import org.chorem.lima.business.ejb.ebp.EntryEBPModel; import org.chorem.lima.business.exceptions.AlreadyExistAccountException; import org.chorem.lima.business.exceptions.AlreadyExistEntryBookException; -import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatement; +import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatementException; import org.chorem.lima.business.exceptions.AlreadyExistVatStatementException; import org.chorem.lima.business.exceptions.BeginAfterEndFiscalPeriodException; import org.chorem.lima.business.exceptions.ImportEbpException; @@ -348,7 +348,7 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ return results; } - protected FinancialStatement returnFinancialStatement (final FinancialStatement rootFinancialStatement, String subFinancialStatementLabel) throws AlreadyExistFinancialStatement, NotAllowedLabelException { + protected FinancialStatement returnFinancialStatement (final FinancialStatement rootFinancialStatement, String subFinancialStatementLabel) throws AlreadyExistFinancialStatementException, NotAllowedLabelException { FinancialStatement targetedFinancialStatement = null; if (rootFinancialStatement != null) { Collection<FinancialStatement> subFinancialStatements = rootFinancialStatement.getSubFinancialStatements(); @@ -470,12 +470,12 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ } result.increaseCreated(); - } catch (AlreadyExistFinancialStatement | NotAllowedLabelException e) { + } catch (AlreadyExistFinancialStatementException | NotAllowedLabelException e) { result.addException(e); } } - private FinancialStatement getRootFinancialStatement(Map<String, FinancialStatement> orderedFinancialStatements, final FinancialStatementImport financialStatementBean, final FinancialStatement financialStatement) throws AlreadyExistFinancialStatement, NotAllowedLabelException { + private FinancialStatement getRootFinancialStatement(Map<String, FinancialStatement> orderedFinancialStatements, final FinancialStatementImport financialStatementBean, final FinancialStatement financialStatement) throws AlreadyExistFinancialStatementException, NotAllowedLabelException { FinancialStatement rootFinancialStatement = orderedFinancialStatements.get(financialStatementBean.getLabel()); if (rootFinancialStatement == null) { @@ -490,7 +490,7 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ return rootFinancialStatement; } - private FinancialStatement getBrancheFinancialStatement(String[] masterNames, final FinancialStatement branchesFinancialStatement) throws AlreadyExistFinancialStatement, NotAllowedLabelException { + private FinancialStatement getBrancheFinancialStatement(String[] masterNames, final FinancialStatement branchesFinancialStatement) throws AlreadyExistFinancialStatementException, NotAllowedLabelException { FinancialStatement _branchesFinancialStatement = branchesFinancialStatement; if (_branchesFinancialStatement != null) { // 0 is root, start from 1 @@ -502,7 +502,7 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ return _branchesFinancialStatement; } - protected void createRootFinancialStatement(Map<String, FinancialStatement> orderedFinancialStatements, final FinancialStatement financialStatement, final FinancialStatement branchesFinancialStatement) throws AlreadyExistFinancialStatement, NotAllowedLabelException { + protected void createRootFinancialStatement(Map<String, FinancialStatement> orderedFinancialStatements, final FinancialStatement financialStatement, final FinancialStatement branchesFinancialStatement) throws AlreadyExistFinancialStatementException, NotAllowedLabelException { // if the master finacial statement has been modified then the current one is replace by the new one. FinancialStatement _financialStatement = financialStatementService.createFinancialStatement(branchesFinancialStatement, financialStatement); FinancialStatement targetedRootFinancialStatement = returnRootFinancialStatement(_financialStatement); @@ -527,7 +527,7 @@ public class ImportServiceImpl extends AbstractLimaService implements ImportServ return alreadyCreated; } - protected FinancialStatement createRootFinancialStatement(Map<String, FinancialStatement> orderedFinancialStatements, String rootMasterName, FinancialStatement rootFinancialStatement) throws AlreadyExistFinancialStatement, NotAllowedLabelException { + protected FinancialStatement createRootFinancialStatement(Map<String, FinancialStatement> orderedFinancialStatements, String rootMasterName, FinancialStatement rootFinancialStatement) throws AlreadyExistFinancialStatementException, NotAllowedLabelException { if (rootFinancialStatement == null) { rootFinancialStatement = financialStatementService.newFinancialStatement(); rootFinancialStatement.setLabel(rootMasterName); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java index e2687e8..b4d2a03 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java @@ -28,7 +28,7 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaSwingConfig; import org.chorem.lima.business.LimaServiceFactory; import org.chorem.lima.business.api.FinancialStatementService; -import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatement; +import org.chorem.lima.business.exceptions.AlreadyExistFinancialStatementException; import org.chorem.lima.business.exceptions.NotAllowedLabelException; import org.chorem.lima.entity.FinancialStatement; import org.chorem.lima.entity.FinancialStatementImpl; @@ -216,7 +216,7 @@ public class FinancialStatementChartTreeTableModel extends AbstractTreeTableMode modelSupport.fireTreeStructureChanged(path); - } catch (AlreadyExistFinancialStatement alreadyExistFinancialStatement) { + } catch (AlreadyExistFinancialStatementException alreadyExistFinancialStatement) { errorHelper.showErrorMessage(t("lima.financialStatement.error.alreadyExistFinancialStatement", alreadyExistFinancialStatement.getFinancialStatementLabel(), alreadyExistFinancialStatement.getMasterLabel())); } catch (NotAllowedLabelException notAllowedLabel) { diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java index 2b65659..b6bf37f 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java @@ -45,6 +45,7 @@ import javax.swing.AbstractAction; import javax.swing.ActionMap; import javax.swing.InputMap; import javax.swing.JComponent; +import javax.swing.JSplitPane; import javax.swing.KeyStroke; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java index cc1c383..0d255c8 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java @@ -28,6 +28,7 @@ import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.entity.VatStatement; import org.chorem.lima.entity.VatStatementImpl; import org.chorem.lima.enums.ImportExportEnum; +import org.chorem.lima.enums.VatStatementsChartEnum; import org.chorem.lima.ui.importexport.ImportExport; import org.jdesktop.swingx.JXTreeTable; @@ -222,8 +223,7 @@ public class VatChartViewHandler implements ServiceListener { if (form.getDeleteVatStatementChart().isSelected()) { vatStatementService.removeAllVatStatement(); } - VatStatementsChartEnum vatStatementsEnum = - (VatStatementsChartEnum) value; + VatStatementsChartEnum vatStatementsEnum = (VatStatementsChartEnum) value; ImportExport importExport = new ImportExport(view); importExport.importExport(ImportExportEnum.CSV_VAT_IMPORT, null, vatStatementsEnum.getDefaultFileUrl(), true); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm