Author: echatellier Date: 2012-04-18 10:42:09 +0200 (Wed, 18 Apr 2012) New Revision: 3377 Url: http://chorem.org/repositories/revision/lima/3377 Log: Remove Monitorable interfaces Removed: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java =================================================================== --- trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -23,6 +23,15 @@ package org.chorem.lima.business; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.ParseException; +import java.util.Locale; +import java.util.Properties; + import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; @@ -37,14 +46,6 @@ import org.chorem.lima.business.api.ImportService; import org.chorem.lima.business.api.ReportService; import org.chorem.lima.business.ejb.ClearService; -import org.chorem.lima.business.ejb.ClearServiceMonitorable; -import org.chorem.lima.business.monitorable.AccountServiceMonitorable; -import org.chorem.lima.business.monitorable.EntryBookServiceMonitorable; -import org.chorem.lima.business.monitorable.FinancialPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.monitorable.ReportServiceMonitorable; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.AccountImpl; import org.chorem.lima.entity.Entry; @@ -67,15 +68,6 @@ import org.nuiton.topia.TopiaNotFoundException; import org.nuiton.topia.TopiaRuntimeException; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -import java.text.DateFormat; -import java.text.ParseException; -import java.util.Locale; -import java.util.Properties; - /** * Common initialization code for all lima tests. * @@ -123,14 +115,14 @@ * @throws IOException */ protected static void initServices() throws IOException { - clearService = LimaServiceFactory.getService(ClearServiceMonitorable.class); - accountService = LimaServiceFactory.getService(AccountServiceMonitorable.class); - entryBookService = LimaServiceFactory.getService(EntryBookServiceMonitorable.class); - financialPeriodService = LimaServiceFactory.getService(FinancialPeriodServiceMonitorable.class); - financialTransactionService = LimaServiceFactory.getService(FinancialTransactionServiceMonitorable.class); - fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodServiceMonitorable.class); - reportService = LimaServiceFactory.getService(ReportServiceMonitorable.class); - importService = LimaServiceFactory.getService(ImportServiceMonitorable.class); + clearService = LimaServiceFactory.getService(ClearService.class); + accountService = LimaServiceFactory.getService(AccountService.class); + entryBookService = LimaServiceFactory.getService(EntryBookService.class); + financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class); + financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class); + fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class); + reportService = LimaServiceFactory.getService(ReportService.class); + importService = LimaServiceFactory.getService(ImportService.class); } /** Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -39,7 +39,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.actions.MiscAction; -import org.chorem.lima.business.monitorable.OptionsServiceMonitorable; +import org.chorem.lima.business.api.OptionsService; import org.chorem.lima.entity.LimaCallaoDAOHelper; import org.chorem.lima.service.LimaServiceFactory; import org.nuiton.topia.TopiaContextFactory; @@ -67,7 +67,7 @@ private static final String configFile = "lima-config.properties"; - protected OptionsServiceMonitorable optionsService; + protected OptionsService optionsService; /** La version du logiciel. */ protected Version version; @@ -504,7 +504,7 @@ super.save(file, forceAll, excludeKeys); // propagate scale option to serveur option - optionsService = LimaServiceFactory.getService(OptionsServiceMonitorable.class); + optionsService = LimaServiceFactory.getService(OptionsService.class); // scale server option String scaleOption = getOption("scale"); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,26 +25,27 @@ package org.chorem.lima; +import static org.nuiton.i18n.I18n._; + +import java.util.Arrays; +import java.util.Date; + +import javax.swing.JOptionPane; +import javax.swing.SwingUtilities; + import jaxx.runtime.SwingUtil; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaBusinessException; import org.chorem.lima.business.api.AccountService; -import org.chorem.lima.business.monitorable.AccountServiceMonitorable; -import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; +import org.chorem.lima.business.api.HttpServerService; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; import org.chorem.lima.ui.MainViewHandler; import org.chorem.lima.ui.opening.OpeningView; import org.chorem.lima.util.ErrorHelper; -import javax.swing.JOptionPane; -import javax.swing.SwingUtilities; -import java.util.Arrays; -import java.util.Date; - -import static org.nuiton.i18n.I18n._; - /** * Lima GUI main class. * @@ -169,10 +170,9 @@ splash.updateProgression(0.7, _("lima.splash.2")); //start http server - LimaServiceFactory.getService(HttpServerServiceMonitorable.class).start(); + LimaServiceFactory.getService(HttpServerService.class).start(); - AccountService accountService = - LimaServiceFactory.getService(AccountServiceMonitorable.class); + AccountService accountService = LimaServiceFactory.getService(AccountService.class); long accountCount = accountService.getAccountCount(); if (accountCount == 0) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,16 +25,28 @@ package org.chorem.lima.ui; +import static org.nuiton.i18n.I18n._; + +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.net.URL; +import java.util.Locale; + +import javax.swing.JButton; +import javax.swing.JTabbedPane; + import jaxx.runtime.JAXXContext; import jaxx.runtime.SwingUtil; import jaxx.runtime.swing.AboutPanel; import jaxx.runtime.swing.editor.config.ConfigUIHelper; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaConfig; import org.chorem.lima.LimaContext; import org.chorem.lima.business.LimaRuntimeException; -import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; +import org.chorem.lima.business.api.HttpServerService; import org.chorem.lima.enums.ImportExportEnum; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.account.AccountView; @@ -56,19 +68,8 @@ import org.chorem.lima.ui.lettering.LetteringView; import org.chorem.lima.ui.vatchart.VatChartView; import org.chorem.lima.ui.vatreports.VatReportView; -import org.chorem.lima.util.ErrorHelper; import org.nuiton.util.DesktopUtil; -import javax.swing.JButton; -import javax.swing.JTabbedPane; -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.net.URL; -import java.util.Locale; - -import static org.nuiton.i18n.I18n._; - /** * Handler for main view. * <p/> @@ -445,7 +446,7 @@ public void loadURI(MainView ui) { int port = LimaServiceFactory.getService( - HttpServerServiceMonitorable.class).getHttpPort(); + HttpServerService.class).getHttpPort(); String address = LimaConfig.getInstance().getHostAdress(); String url = "http://" + address + ":" + port + "/"; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,26 +25,25 @@ package org.chorem.lima.ui.accountsreports; +import static org.nuiton.i18n.I18n._; + +import java.math.BigDecimal; +import java.util.Date; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.ReportsDatas; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.monitorable.ReportServiceMonitorable; +import org.chorem.lima.business.api.FinancialTransactionService; +import org.chorem.lima.business.api.ImportService; +import org.chorem.lima.business.api.ReportService; import org.chorem.lima.entity.Account; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.combobox.AccountComboBoxModel; -import org.chorem.lima.util.ErrorHelper; -import java.math.BigDecimal; -import java.util.Date; -import static org.nuiton.i18n.I18n._; - - /** * Handler associated with accounts reports view. * By : $Author$ @@ -72,17 +71,14 @@ protected Date selectedEndDate; /** Services. */ - protected ReportServiceMonitorable reportService; + protected ReportService reportService; protected AccountsReportsViewHandler(AccountsReportsView view) { this.view = view; - reportService = - LimaServiceFactory.getService(ReportServiceMonitorable.class); - LimaServiceFactory.addServiceListener( - ImportServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener( - FinancialTransactionServiceMonitorable.class, this); + reportService = LimaServiceFactory.getService(ReportService.class); + LimaServiceFactory.addServiceListener(ImportService.class, this); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); } public void setBeginDate(Date date) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,25 +25,8 @@ package org.chorem.lima.ui.balance; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.lima.LimaConfig; -import org.chorem.lima.beans.BalanceTrial; -import org.chorem.lima.business.LimaException; -import org.chorem.lima.business.LimaRuntimeException; -import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.monitorable.ReportServiceMonitorable; -import org.chorem.lima.business.utils.DocumentsEnum; -import org.chorem.lima.business.utils.FormatsEnum; -import org.chorem.lima.entity.FiscalPeriod; -import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.util.ErrorHelper; +import static org.nuiton.i18n.I18n._; -import javax.swing.JOptionPane; import java.awt.Desktop; import java.io.IOException; import java.math.BigDecimal; @@ -54,9 +37,26 @@ import java.util.Date; import java.util.List; -import static org.nuiton.i18n.I18n._; +import javax.swing.JOptionPane; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.LimaConfig; +import org.chorem.lima.beans.BalanceTrial; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.business.LimaRuntimeException; +import org.chorem.lima.business.ServiceListener; +import org.chorem.lima.business.api.FinancialTransactionService; +import org.chorem.lima.business.api.FiscalPeriodService; +import org.chorem.lima.business.api.HttpServerService; +import org.chorem.lima.business.api.ImportService; +import org.chorem.lima.business.api.ReportService; +import org.chorem.lima.business.utils.DocumentsEnum; +import org.chorem.lima.business.utils.FormatsEnum; +import org.chorem.lima.entity.FiscalPeriod; +import org.chorem.lima.service.LimaServiceFactory; + /** * Handler associated with accounts reports view. * By : $Author$ @@ -69,11 +69,11 @@ private static final Log log = LogFactory.getLog(BalanceViewHandler.class); /** Services. */ - protected ReportServiceMonitorable reportService; + protected ReportService reportService; - protected HttpServerServiceMonitorable httpServerServiceMonitorable; + protected HttpServerService httpServerServiceMonitorable; - protected FiscalPeriodServiceMonitorable fiscalPeriodService; + protected FiscalPeriodService fiscalPeriodService; /** DatePicker Begin Date. */ protected Date selectedBeginDate; @@ -96,15 +96,12 @@ protected BalanceViewHandler(BalanceView view) { this.view = view; - reportService = - LimaServiceFactory.getService(ReportServiceMonitorable.class); - port = LimaServiceFactory.getService( - HttpServerServiceMonitorable.class).getHttpPort(); + reportService = LimaServiceFactory.getService(ReportService.class); + port = LimaServiceFactory.getService(HttpServerService.class).getHttpPort(); fiscalPeriodService = - LimaServiceFactory.getService( - FiscalPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(FinancialTransactionServiceMonitorable.class, this); + LimaServiceFactory.getService(FiscalPeriodService.class); + LimaServiceFactory.addServiceListener(ImportService.class, this); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,20 +25,20 @@ package org.chorem.lima.ui.combobox; +import java.util.List; + +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.AccountService; -import org.chorem.lima.business.monitorable.AccountServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.Account; import org.chorem.lima.service.LimaServiceFactory; -import javax.swing.AbstractListModel; -import javax.swing.ComboBoxModel; -import java.util.List; - /** Account combo box model. */ public class AccountComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener { @@ -57,9 +57,9 @@ public AccountComboBoxModel() { accountService = LimaServiceFactory.getService( - AccountServiceMonitorable.class); - LimaServiceFactory.addServiceListener(accountService, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + AccountService.class); + LimaServiceFactory.addServiceListener(AccountService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); datasCache = getDataList(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,20 +25,20 @@ package org.chorem.lima.ui.combobox; +import java.util.List; + +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.EntryBookService; -import org.chorem.lima.business.monitorable.EntryBookServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.service.LimaServiceFactory; -import javax.swing.AbstractListModel; -import javax.swing.ComboBoxModel; -import java.util.List; - /** * Opened financial period combo box model. * @@ -63,9 +63,9 @@ public EntryBookComboBoxModel() { entryBookService = - LimaServiceFactory.getService(EntryBookServiceMonitorable.class); - LimaServiceFactory.addServiceListener(EntryBookServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + LimaServiceFactory.getService(EntryBookService.class); + LimaServiceFactory.addServiceListener(EntryBookService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); cacheDatas = getDataList(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,22 +25,22 @@ package org.chorem.lima.ui.combobox; +import java.util.List; + +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FinancialPeriodService; -import org.chorem.lima.business.monitorable.FinancialPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +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.service.LimaServiceFactory; -import javax.swing.AbstractListModel; -import javax.swing.ComboBoxModel; -import java.util.List; - /** * Opened financial period combo box model. * @@ -84,10 +84,10 @@ financialPeriodService = LimaServiceFactory.getService( - FinancialPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(financialPeriodService, this); - LimaServiceFactory.addServiceListener(FiscalPeriodServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + FinancialPeriodService.class); + LimaServiceFactory.addServiceListener(FinancialPeriodService.class, this); + LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); if (displayAllPeriods) { datasCache = getAllDataList(); } else { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,21 +25,21 @@ package org.chorem.lima.ui.combobox; +import java.util.List; + +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FiscalPeriodService; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel; -import javax.swing.AbstractListModel; -import javax.swing.ComboBoxModel; -import java.util.List; - public class FiscalPeriodComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener { private static final long serialVersionUID = 1L; @@ -56,9 +56,9 @@ public FiscalPeriodComboBoxModel() { fiscalPeriodService = LimaServiceFactory.getService( - FiscalPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(fiscalPeriodService, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + FiscalPeriodService.class); + LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); datasCache = getDataList(); } @@ -66,9 +66,9 @@ public FiscalPeriodComboBoxModel(boolean all) { fiscalPeriodService = LimaServiceFactory.getService( - FiscalPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(fiscalPeriodService, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + FiscalPeriodService.class); + LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); datasCache = getAllDataList(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LeafAccountComboBoxModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,21 +25,21 @@ package org.chorem.lima.ui.combobox; +import java.util.ArrayList; +import java.util.List; + +import javax.swing.AbstractListModel; +import javax.swing.ComboBoxModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.AccountService; -import org.chorem.lima.business.monitorable.AccountServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.Account; import org.chorem.lima.service.LimaServiceFactory; -import javax.swing.AbstractListModel; -import javax.swing.ComboBoxModel; -import java.util.ArrayList; -import java.util.List; - /** * Account combo box model containing only leaf account (without sub accounts). */ @@ -57,9 +57,9 @@ public LeafAccountComboBoxModel() { accountService = - LimaServiceFactory.getService(AccountServiceMonitorable.class); - LimaServiceFactory.addServiceListener(accountService, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + LimaServiceFactory.getService(AccountService.class); + LimaServiceFactory.addServiceListener(AccountService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); datasCache = getDataList(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -46,18 +46,17 @@ import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.monitorable.DocumentServiceMonitorable; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.monitorable.ReportServiceMonitorable; +import org.chorem.lima.business.api.DocumentService; +import org.chorem.lima.business.api.FinancialTransactionService; +import org.chorem.lima.business.api.FiscalPeriodService; +import org.chorem.lima.business.api.HttpServerService; +import org.chorem.lima.business.api.ImportService; +import org.chorem.lima.business.api.ReportService; import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.FormatsEnum; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.util.ErrorHelper; /** @@ -76,11 +75,11 @@ private static final Log log = LogFactory.getLog(EntryBooksReportsViewHandler.class); /** Services. */ - protected ReportServiceMonitorable reportService; + protected ReportService reportService; - protected DocumentServiceMonitorable documentService; + protected DocumentService documentService; - protected FiscalPeriodServiceMonitorable fiscalPeriodService; + protected FiscalPeriodService fiscalPeriodService; /** Account. */ protected EntryBook selectedEntryBook; @@ -99,19 +98,12 @@ protected EntryBooksReportsViewHandler(EntryBooksReportsView view) { this.view = view; - reportService = - LimaServiceFactory.getService( - ReportServiceMonitorable.class); - port = LimaServiceFactory.getService( - HttpServerServiceMonitorable.class).getHttpPort(); - documentService = - LimaServiceFactory.getService( - DocumentServiceMonitorable.class); - fiscalPeriodService = - LimaServiceFactory.getService( - FiscalPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(FinancialTransactionServiceMonitorable.class, this); + reportService = LimaServiceFactory.getService(ReportService.class); + port = LimaServiceFactory.getService(HttpServerService.class).getHttpPort(); + documentService = LimaServiceFactory.getService(DocumentService.class); + fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class); + LimaServiceFactory.addServiceListener(ImportService.class, this); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); } public void setBeginDate(Date date) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartTreeTableModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,20 +25,21 @@ package org.chorem.lima.ui.financialstatementchart; +import static org.nuiton.i18n.I18n._; + +import java.util.List; + +import javax.swing.tree.TreePath; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; -import org.chorem.lima.business.monitorable.FinancialStatementServiceMonitorable; +import org.chorem.lima.business.api.FinancialStatementService; import org.chorem.lima.entity.FinancialStatement; import org.chorem.lima.entity.FinancialStatementImpl; import org.chorem.lima.service.LimaServiceFactory; import org.jdesktop.swingx.treetable.AbstractTreeTableModel; -import javax.swing.tree.TreePath; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - /** * Tree table model for account edition. * @@ -55,7 +56,7 @@ private static final Log log = LogFactory.getLog(FinancialStatementChartViewHandler.class); /** Services. */ - protected final FinancialStatementServiceMonitorable financialStatementService; + protected final FinancialStatementService financialStatementService; /** Model constructor. Init account service used here. */ public FinancialStatementChartTreeTableModel() { @@ -63,8 +64,7 @@ super(new FinancialStatementImpl()); // Gets factory service financialStatementService = - LimaServiceFactory.getService( - FinancialStatementServiceMonitorable.class); + LimaServiceFactory.getService(FinancialStatementService.class); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,14 +25,19 @@ package org.chorem.lima.ui.financialstatementchart; +import static org.nuiton.i18n.I18n._; + +import javax.swing.JOptionPane; +import javax.swing.tree.TreePath; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaBusinessException; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.monitorable.FinancialStatementServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.FinancialStatementService; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.FinancialStatement; import org.chorem.lima.entity.FinancialStatementImpl; import org.chorem.lima.enums.FinancialStatementsChartEnum; @@ -40,14 +45,8 @@ import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.importexport.ImportExport; import org.chorem.lima.util.DialogHelper; -import org.chorem.lima.util.ErrorHelper; import org.jdesktop.swingx.JXTreeTable; -import javax.swing.JOptionPane; -import javax.swing.tree.TreePath; - -import static org.nuiton.i18n.I18n._; - /** * Handler associated with account view. * @@ -62,7 +61,7 @@ /** log. */ private static final Log log = LogFactory.getLog(FinancialStatementChartViewHandler.class); - protected FinancialStatementServiceMonitorable financialStatementService; + protected FinancialStatementService financialStatementService; protected FinancialStatementChartView view; @@ -71,8 +70,8 @@ financialStatementService = LimaServiceFactory.getService( - FinancialStatementServiceMonitorable.class); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + FinancialStatementService.class); + LimaServiceFactory.addServiceListener(ImportService.class, this); } /** Add new account with account form. */ Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,6 +25,19 @@ package org.chorem.lima.ui.financialstatementreport; +import static org.nuiton.i18n.I18n._; + +import java.awt.Desktop; +import java.io.IOException; +import java.math.BigDecimal; +import java.net.URI; +import java.net.URISyntaxException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +import javax.swing.table.AbstractTableModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaConfig; @@ -34,28 +47,13 @@ import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.DocumentService; import org.chorem.lima.business.api.FinancialStatementService; -import org.chorem.lima.business.monitorable.DocumentServiceMonitorable; -import org.chorem.lima.business.monitorable.FinancialStatementServiceMonitorable; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.FinancialTransactionService; +import org.chorem.lima.business.api.HttpServerService; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.FormatsEnum; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.util.ErrorHelper; -import javax.swing.table.AbstractTableModel; -import java.awt.Desktop; -import java.io.IOException; -import java.math.BigDecimal; -import java.net.URI; -import java.net.URISyntaxException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - /** * Entry book table model. * @@ -97,14 +95,14 @@ public FinancialStatementReportTableModel() { financialStatementService = LimaServiceFactory.getService( - FinancialStatementServiceMonitorable.class); + FinancialStatementService.class); - LimaServiceFactory.addServiceListener(financialStatementService, this); + LimaServiceFactory.addServiceListener(FinancialStatementService.class, this); port = LimaServiceFactory.getService( - HttpServerServiceMonitorable.class).getHttpPort(); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(FinancialTransactionServiceMonitorable.class, this); - documentService = LimaServiceFactory.getService(DocumentServiceMonitorable.class); + HttpServerService.class).getHttpPort(); + LimaServiceFactory.addServiceListener(ImportService.class, this); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); + documentService = LimaServiceFactory.getService(DocumentService.class); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,23 +25,23 @@ package org.chorem.lima.ui.financialstatementreport; +import static org.nuiton.i18n.I18n._; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.swing.JOptionPane; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; +import org.chorem.lima.business.api.FiscalPeriodService; import org.chorem.lima.business.utils.FormatsEnum; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.util.ErrorHelper; -import javax.swing.JOptionPane; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - /** * Handler associated with accounts reports view. * @@ -60,13 +60,13 @@ protected FinancialStatementReportTableModel model; - protected FiscalPeriodServiceMonitorable fiscalPeriodService; + protected FiscalPeriodService fiscalPeriodService; protected FinancialStatementReportViewHandler(FinancialStatementReportView view) { this.view = view; fiscalPeriodService = LimaServiceFactory.getService( - FiscalPeriodServiceMonitorable.class); + FiscalPeriodService.class); } public void refresh() { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,6 +25,15 @@ package org.chorem.lima.ui.financialtransactionsearch; +import static org.nuiton.i18n.I18n._; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import javax.swing.table.AbstractTableModel; + import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -35,8 +44,6 @@ import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FinancialPeriodService; import org.chorem.lima.business.api.FinancialTransactionService; -import org.chorem.lima.business.monitorable.FinancialPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; @@ -47,16 +54,7 @@ import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.util.DialogHelper; -import org.chorem.lima.util.ErrorHelper; -import javax.swing.table.AbstractTableModel; -import java.math.BigDecimal; -import java.util.Calendar; -import java.util.Date; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - /** * Basic transaction table model. * <p/> @@ -102,11 +100,11 @@ /* Services */ financialTransactionService = LimaServiceFactory.getService( - FinancialTransactionServiceMonitorable.class); - LimaServiceFactory.addServiceListener(financialTransactionService, this); + FinancialTransactionService.class); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); financialPeriodService = LimaServiceFactory.getService( - FinancialPeriodServiceMonitorable.class); + FinancialPeriodService.class); } /** Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,6 +25,13 @@ package org.chorem.lima.ui.financialtransactionsearch; +import static org.nuiton.i18n.I18n._; + +import java.util.Date; + +import javax.swing.JOptionPane; +import javax.swing.ListSelectionModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.FinancialStatementWayEnum; @@ -32,7 +39,6 @@ import org.chorem.lima.beans.FinancialTransactionSearchImpl; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.api.FinancialTransactionService; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; @@ -41,12 +47,6 @@ import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel; import org.chorem.lima.util.DialogHelper; -import javax.swing.JOptionPane; -import javax.swing.ListSelectionModel; -import java.util.Date; - -import static org.nuiton.i18n.I18n._; - /** * Handler associated with financial transaction view. * @@ -84,7 +84,7 @@ /* Services */ financialTransactionService = LimaServiceFactory.getService( - FinancialTransactionServiceMonitorable.class); + FinancialTransactionService.class); financialTransactionSearch = new FinancialTransactionSearchImpl(); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,13 +25,22 @@ package org.chorem.lima.ui.financialtransactionunbalanced; +import static org.nuiton.i18n.I18n._; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +import javax.swing.table.AbstractTableModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FinancialTransactionService; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; import org.chorem.lima.business.utils.EntryComparator; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; @@ -41,17 +50,7 @@ import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.util.DialogHelper; -import org.chorem.lima.util.ErrorHelper; -import javax.swing.table.AbstractTableModel; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - /** * Basic transaction table model. * <p/> @@ -95,7 +94,7 @@ /* Services */ financialTransactionService = LimaServiceFactory.getService( - FinancialTransactionServiceMonitorable.class); + FinancialTransactionService.class); LimaServiceFactory.addServiceListener(financialTransactionService, this); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AccountsPane.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -34,8 +34,8 @@ import org.chorem.lima.LimaContext; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.monitorable.AccountServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.AccountService; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; @@ -54,14 +54,14 @@ private static final Log log = LogFactory.getLog(AccountsPane.class); - protected AccountServiceMonitorable accountService; + protected AccountService accountService; public AccountsPane(HomeView view) { super(view); - accountService = LimaServiceFactory.getService(AccountServiceMonitorable.class); - LimaServiceFactory.addServiceListener(AccountServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + accountService = LimaServiceFactory.getService(AccountService.class); + LimaServiceFactory.addServiceListener(AccountService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); refresh(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -37,8 +37,7 @@ import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.EntryBookService; -import org.chorem.lima.business.monitorable.EntryBookServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.EntryBook; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; @@ -63,9 +62,9 @@ public EntryBooksPane(HomeView view) { super(view); - entryBookService = LimaServiceFactory.getService(EntryBookServiceMonitorable.class); - LimaServiceFactory.addServiceListener(EntryBookServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + entryBookService = LimaServiceFactory.getService(EntryBookService.class); + LimaServiceFactory.addServiceListener(EntryBookService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); refresh(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -38,9 +38,7 @@ import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FinancialTransactionService; import org.chorem.lima.business.api.FiscalPeriodService; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; @@ -68,11 +66,11 @@ public FinancialTransactionsPane(HomeView view) { super(view); - financialTransactionService = LimaServiceFactory.getService(FinancialTransactionServiceMonitorable.class); - fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(FinancialTransactionServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(FiscalPeriodServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class); + fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); + LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); refresh(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -37,8 +37,7 @@ import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FiscalPeriodService; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.MainView; @@ -69,9 +68,9 @@ public FiscalPeriodsPane(HomeView view) { super(view); - fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(FiscalPeriodServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class); + LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); refresh(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -29,7 +29,6 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.api.IdentityService; -import org.chorem.lima.business.monitorable.IdentityServiceMonitorable; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.IdentityImpl; import org.chorem.lima.service.LimaServiceFactory; @@ -44,7 +43,7 @@ public IdentityHandler() { identityService = LimaServiceFactory.getService( - IdentityServiceMonitorable.class); + IdentityService.class); } public Identity getIdentity() { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,26 +25,8 @@ package org.chorem.lima.ui.importexport; -import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.lima.business.LimaException; -import org.chorem.lima.business.monitorable.ExportServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.utils.ImportExportEntityEnum; -import org.chorem.lima.enums.EncodingEnum; -import org.chorem.lima.enums.ImportExportEnum; -import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.ui.account.AccountViewHandler; -import org.chorem.lima.util.DialogHelper; -import org.jdesktop.swingx.painter.BusyPainter; +import static org.nuiton.i18n.I18n._; -import javax.swing.JComboBox; -import javax.swing.JFileChooser; -import javax.swing.JLabel; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.SwingWorker; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -61,8 +43,27 @@ import java.io.StringWriter; import java.util.concurrent.ExecutionException; -import static org.nuiton.i18n.I18n._; +import javax.swing.JComboBox; +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.SwingWorker; +import org.apache.commons.io.IOUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.lima.business.LimaException; +import org.chorem.lima.business.api.ExportService; +import org.chorem.lima.business.api.ImportService; +import org.chorem.lima.business.utils.ImportExportEntityEnum; +import org.chorem.lima.enums.EncodingEnum; +import org.chorem.lima.enums.ImportExportEnum; +import org.chorem.lima.service.LimaServiceFactory; +import org.chorem.lima.ui.account.AccountViewHandler; +import org.chorem.lima.util.DialogHelper; +import org.jdesktop.swingx.painter.BusyPainter; + public class ImportExport { private static final Log log = LogFactory.getLog(AccountViewHandler.class); @@ -71,9 +72,9 @@ protected EncodingEnum encodingEnum; - protected ImportServiceMonitorable importService; + protected ImportService importService; - protected ExportServiceMonitorable exportService; + protected ExportService exportService; private ImportExportWaitView waitView; @@ -81,12 +82,8 @@ viewComponent = view; //services - importService = - LimaServiceFactory.getService( - ImportServiceMonitorable.class); - exportService = - LimaServiceFactory.getService( - ExportServiceMonitorable.class); + importService = LimaServiceFactory.getService(ImportService.class); + exportService = LimaServiceFactory.getService(ExportService.class); //create the wait dialog panel waitView = new ImportExportWaitView(); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,6 +25,21 @@ package org.chorem.lima.ui.ledger; +import static org.nuiton.i18n.I18n._; + +import java.awt.Desktop; +import java.io.IOException; +import java.math.BigDecimal; +import java.net.URI; +import java.net.URISyntaxException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +import javax.swing.JOptionPane; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaConfig; @@ -33,36 +48,19 @@ import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; import org.chorem.lima.business.ServiceListener; +import org.chorem.lima.business.api.FinancialTransactionService; import org.chorem.lima.business.api.FiscalPeriodService; +import org.chorem.lima.business.api.HttpServerService; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.business.api.ReportService; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; -import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.monitorable.ReportServiceMonitorable; import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.business.utils.EntryComparator; import org.chorem.lima.business.utils.FormatsEnum; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.util.ErrorHelper; -import javax.swing.JOptionPane; -import java.awt.Desktop; -import java.io.IOException; -import java.math.BigDecimal; -import java.net.URI; -import java.net.URISyntaxException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import static org.nuiton.i18n.I18n._; - - /** * Handler associated with accounts reports view. * By : $Author$ @@ -105,16 +103,12 @@ this.view = view; reportService = - LimaServiceFactory.getService(ReportServiceMonitorable.class); - LimaServiceFactory.addServiceListener(reportService, this); - port = LimaServiceFactory.getService( - HttpServerServiceMonitorable.class).getHttpPort(); -// documentService = -// LimaServiceFactory.getService(DocumentServiceMonitorable.class); - fiscalPeriodService = - LimaServiceFactory.getService(FiscalPeriodServiceMonitorable.class); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener(FinancialTransactionServiceMonitorable.class, this); + LimaServiceFactory.getService(ReportService.class); + LimaServiceFactory.addServiceListener(ReportService.class, this); + port = LimaServiceFactory.getService(HttpServerService.class).getHttpPort(); + fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class); + LimaServiceFactory.addServiceListener(ImportService.class, this); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); } public void setBeginDate(Date date) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,14 +25,23 @@ package org.chorem.lima.ui.lettering; +import static org.nuiton.i18n.I18n._; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +import javax.swing.table.AbstractTableModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; import org.chorem.lima.business.ServiceListener; import org.chorem.lima.business.api.FinancialTransactionService; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.business.utils.EntryComparator; import org.chorem.lima.entity.Account; import org.chorem.lima.entity.Entry; @@ -40,20 +49,7 @@ import org.chorem.lima.entity.FinancialTransaction; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.util.DialogHelper; -import org.chorem.lima.util.ErrorHelper; -import org.nuiton.util.Resource; -import javax.swing.JFrame; -import javax.swing.JOptionPane; -import javax.swing.table.AbstractTableModel; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - /** * Basic transaction table model. * <p/> @@ -101,9 +97,9 @@ /* Services */ financialTransactionService = LimaServiceFactory.getService( - FinancialTransactionServiceMonitorable.class); - LimaServiceFactory.addServiceListener(financialTransactionService,this); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + FinancialTransactionService.class); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class,this); + LimaServiceFactory.addServiceListener(ImportService.class, this); } public void setSelectedBeginDate(Date date) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,22 +25,16 @@ package org.chorem.lima.ui.lettering; +import java.util.Date; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.chorem.lima.business.LimaException; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; +import org.chorem.lima.business.api.FinancialTransactionService; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel; import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel; -import org.chorem.lima.util.DialogHelper; -import javax.swing.JComboBox; -import javax.swing.JTextField; -import java.util.Date; -import static org.nuiton.i18n.I18n._; - - /** * Handler associated with financial transaction view. * @@ -67,7 +61,7 @@ protected FinancialPeriodComboBoxModel financialPeriodComboBoxModel; /** Transaction service. */ - protected final FinancialTransactionServiceMonitorable financialTransactionService; + protected final FinancialTransactionService financialTransactionService; protected Object clipBoard; @@ -75,9 +69,7 @@ this.view = view; /* Services */ - financialTransactionService = - LimaServiceFactory.getService( - FinancialTransactionServiceMonitorable.class); + financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class); } public void setBeginDate(Date date) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/CreateFiscalPeriodPanel.jaxx 2012-04-18 08:42:09 UTC (rev 3377) @@ -29,16 +29,16 @@ org.apache.commons.lang3.time.DateUtils org.jdesktop.swingx.JXDatePicker org.chorem.lima.entity.FiscalPeriod - org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable + org.chorem.lima.business.api.FiscalPeriodService org.chorem.lima.business.LimaException org.chorem.lima.service.LimaServiceFactory </import> <script> <![CDATA[ - protected FiscalPeriodServiceMonitorable fiscalPeriodService = + protected FiscalPeriodService fiscalPeriodService = LimaServiceFactory.getService( - FiscalPeriodServiceMonitorable.class); + FiscalPeriodService.class); // set begin date picker Date endDate = null; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/OpeningViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -25,10 +25,19 @@ package org.chorem.lima.ui.opening; +import static org.nuiton.i18n.I18n._; + +import java.awt.Color; + +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; -import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable; +import org.chorem.lima.business.api.FiscalPeriodService; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.entity.FiscalPeriodImpl; import org.chorem.lima.enums.AccountsChartEnum; @@ -40,14 +49,6 @@ import org.chorem.lima.ui.identity.IdentityHandler; import org.chorem.lima.ui.importexport.ImportExport; -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import javax.swing.border.Border; -import javax.swing.border.EmptyBorder; -import java.awt.Color; - -import static org.nuiton.i18n.I18n._; - public class OpeningViewHandler { private static final Log log = LogFactory.getLog(OpeningViewHandler.class); @@ -192,7 +193,7 @@ fiscalPeriod.setEndDate(fsPanel.getEndDatePicker().getDate()); LimaServiceFactory.getService( - FiscalPeriodServiceMonitorable.class). + FiscalPeriodService.class). createFiscalPeriod(fiscalPeriod); } catch (LimaException ex) { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartTreeTableModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -24,27 +24,28 @@ */ package org.chorem.lima.ui.vatchart; +import static org.nuiton.i18n.I18n._; + +import java.util.List; + +import javax.swing.tree.TreePath; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaException; -import org.chorem.lima.business.monitorable.VatStatementServiceMonitorable; +import org.chorem.lima.business.api.VatStatementService; import org.chorem.lima.entity.VatStatement; import org.chorem.lima.entity.VatStatementImpl; import org.chorem.lima.service.LimaServiceFactory; import org.jdesktop.swingx.treetable.AbstractTreeTableModel; -import javax.swing.tree.TreePath; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - public class VatChartTreeTableModel extends AbstractTreeTableModel { /** log. */ private static final Log log = LogFactory.getLog(VatChartViewHandler.class); /** Services. */ - protected final VatStatementServiceMonitorable vatStatementService; + protected final VatStatementService vatStatementService; /** Model constructor. Initiate account service used here. */ public VatChartTreeTableModel() { @@ -53,7 +54,7 @@ // Gets factory service vatStatementService = LimaServiceFactory.getService( - VatStatementServiceMonitorable.class); + VatStatementService.class); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -24,13 +24,18 @@ */ package org.chorem.lima.ui.vatchart; +import static org.nuiton.i18n.I18n._; + +import javax.swing.JOptionPane; +import javax.swing.tree.TreePath; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.business.LimaBusinessException; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.ServiceListener; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.monitorable.VatStatementServiceMonitorable; +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; @@ -39,18 +44,12 @@ import org.chorem.lima.ui.importexport.ImportExport; import org.jdesktop.swingx.JXTreeTable; -import javax.swing.JOptionPane; -import javax.swing.tree.TreePath; -import java.math.BigDecimal; - -import static org.nuiton.i18n.I18n._; - public class VatChartViewHandler implements ServiceListener { /** log. */ private static final Log log = LogFactory.getLog(VatChartViewHandler.class); - protected VatStatementServiceMonitorable vatStatementService; + protected VatStatementService vatStatementService; protected VatChartView view; @@ -59,8 +58,8 @@ vatStatementService = LimaServiceFactory.getService( - VatStatementServiceMonitorable.class); - LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this); + VatStatementService.class); + LimaServiceFactory.addServiceListener(ImportService.class, this); } public void addVatStatementMovement() { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -24,27 +24,26 @@ */ package org.chorem.lima.ui.vatreports; +import static org.nuiton.i18n.I18n._; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +import javax.swing.table.AbstractTableModel; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.beans.VatStatementAmounts; import org.chorem.lima.business.LimaException; import org.chorem.lima.business.LimaRuntimeException; import org.chorem.lima.business.ServiceListener; +import org.chorem.lima.business.api.FinancialTransactionService; +import org.chorem.lima.business.api.ImportService; import org.chorem.lima.business.api.VatStatementService; -import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable; -import org.chorem.lima.business.monitorable.ImportServiceMonitorable; -import org.chorem.lima.business.monitorable.VatStatementServiceMonitorable; import org.chorem.lima.service.LimaServiceFactory; -import org.chorem.lima.util.ErrorHelper; import org.nuiton.topia.TopiaException; -import javax.swing.table.AbstractTableModel; -import java.math.BigDecimal; -import java.util.Date; -import java.util.List; - -import static org.nuiton.i18n.I18n._; - public class VatReportTableModel extends AbstractTableModel implements ServiceListener { /** serialVersionUID. */ @@ -80,22 +79,13 @@ public VatReportTableModel() { -// reportService = -// LimaServiceFactory.getService( -// ReportServiceMonitorable.class); - //add listeners vatStatementService = LimaServiceFactory.getService( - VatStatementServiceMonitorable.class); - LimaServiceFactory.addServiceListener(vatStatementService, this); - LimaServiceFactory.addServiceListener( - FinancialTransactionServiceMonitorable.class, this); - LimaServiceFactory.addServiceListener( - ImportServiceMonitorable.class, this); - -// //sets autocomplete mode to true on start -// autocomplete = "true"; + VatStatementService.class); + LimaServiceFactory.addServiceListener(VatStatementService.class, this); + LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this); + LimaServiceFactory.addServiceListener(ImportService.class, this); } protected List<VatStatementAmounts> getDataList() throws TopiaException { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java 2012-04-18 08:14:53 UTC (rev 3376) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportViewHandler.java 2012-04-18 08:42:09 UTC (rev 3377) @@ -24,23 +24,23 @@ */ package org.chorem.lima.ui.vatreports; +import java.awt.Desktop; +import java.io.IOException; +import java.math.BigDecimal; +import java.net.URI; +import java.net.URISyntaxException; +import java.text.SimpleDateFormat; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaConfig; -import org.chorem.lima.business.monitorable.DocumentServiceMonitorable; -import org.chorem.lima.business.monitorable.HttpServerServiceMonitorable; +import org.chorem.lima.business.api.DocumentService; +import org.chorem.lima.business.api.HttpServerService; import org.chorem.lima.business.utils.DocumentsEnum; import org.chorem.lima.service.LimaServiceFactory; import org.chorem.lima.ui.celleditor.BigDecimalTableCellEditor; import org.chorem.lima.ui.celleditor.BigDecimalTableCellRenderer; -import java.awt.Desktop; -import java.io.IOException; -import java.math.BigDecimal; -import java.net.URI; -import java.net.URISyntaxException; -import java.text.SimpleDateFormat; - public class VatReportViewHandler { /** log. */ private static final Log log = @@ -48,7 +48,7 @@ protected VatReportView view; - protected DocumentServiceMonitorable documentService; + protected DocumentService documentService; private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @@ -58,12 +58,9 @@ protected VatReportViewHandler(VatReportView view) { this.view = view; - port = LimaServiceFactory.getService( - HttpServerServiceMonitorable.class).getHttpPort(); + port = LimaServiceFactory.getService(HttpServerService.class).getHttpPort(); - documentService = - LimaServiceFactory.getService( - DocumentServiceMonitorable.class); + documentService = LimaServiceFactory.getService(DocumentService.class); } public void init() {