Lima-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
April 2012
- 2 participants
- 49 discussions
r3367 - in trunk: lima-callao/src/main/java/org/chorem/lima/entity lima-swing/src/main/java/org/chorem/lima/ui/financialperiod lima-swing/src/main/resources/i18n
by echatellier@users.chorem.org 13 Apr '12
by echatellier@users.chorem.org 13 Apr '12
13 Apr '12
Author: echatellier
Date: 2012-04-13 16:44:59 +0200 (Fri, 13 Apr 2012)
New Revision: 3367
Url: http://chorem.org/repositories/revision/lima/3367
Log:
Financial period ui refactoring
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/package-info.java
Modified:
trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java 2012-04-13 13:46:24 UTC (rev 3366)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java 2012-04-13 14:44:59 UTC (rev 3367)
@@ -46,11 +46,11 @@
@Override
public BigDecimal getAmountDebit() {
BigDecimal result = new BigDecimal(0);
- /*for (Entry entryFT : getEntry()) {
+ for (Entry entryFT : getEntry()) {
if (entryFT.isDebit()) {
result.add(entryFT.getAmount());
}
- }*/
+ }
return result;
}
@@ -60,11 +60,11 @@
@Override
public BigDecimal getAmountCredit() {
BigDecimal result = new BigDecimal(0);
- /*for (Entry entryFT : getEntry()) {
+ for (Entry entryFT : getEntry()) {
if (!entryFT.isDebit()) {
result.add(entryFT.getAmount());
}
- }*/
+ }
return result;
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java 2012-04-13 13:46:24 UTC (rev 3366)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java 2012-04-13 14:44:59 UTC (rev 3367)
@@ -25,112 +25,78 @@
package org.chorem.lima.ui.financialperiod;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.api.FinancialPeriodService;
-import org.chorem.lima.business.monitorable.FinancialPeriodServiceMonitorable;
-import org.chorem.lima.entity.ClosedPeriodicEntryBook;
-import org.chorem.lima.entity.ClosedPeriodicEntryBookImpl;
-import org.chorem.lima.service.LimaServiceFactory;
-import org.jdesktop.swingx.JXTable;
-import org.jdesktop.swingx.decorator.ColorHighlighter;
-import org.jdesktop.swingx.decorator.ComponentAdapter;
-import org.jdesktop.swingx.decorator.HighlightPredicate;
-import org.jdesktop.swingx.decorator.Highlighter;
-
import java.awt.Color;
import java.awt.Component;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
-import java.text.SimpleDateFormat;
-public class FinancialPeriodTable extends JXTable
- implements KeyListener, MouseListener {
+import org.chorem.lima.entity.ClosedPeriodicEntryBook;
+import org.jdesktop.swingx.JXTable;
+import org.jdesktop.swingx.decorator.ColorHighlighter;
+import org.jdesktop.swingx.decorator.ComponentAdapter;
+import org.jdesktop.swingx.decorator.HighlightPredicate;
+import org.jdesktop.swingx.decorator.Highlighter;
+import org.jdesktop.swingx.decorator.HighlighterFactory;
+/**
+ * Financial period table adding color hidhlighter and key management.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FinancialPeriodTable extends JXTable implements KeyListener, MouseListener {
+
+ /** serialVersionUID. */
private static final long serialVersionUID = -1960326844433064178L;
- private static final Log log =
- LogFactory.getLog(FinancialPeriodTableModel.class);
-
protected FinancialPeriodViewHandler handler;
protected FinancialPeriodTableModel model;
- protected FinancialPeriodService financialPeriodService;
-
- private Highlighter colorTransaction;
-
- /*
- * Constructor, call highlighter
- */
+ /**
+ * Constructor, install highlighter.
+ *
+ * @param handler
+ */
public FinancialPeriodTable(FinancialPeriodViewHandler handler) {
-
this.handler = handler;
+ model = handler.view.getFinancialPeriodTableModel();
addKeyListener(this);
addMouseListener(this);
- model = this.handler.getView().modelFinancialPeriodTable;
- financialPeriodService =
- LimaServiceFactory.getService(
- FinancialPeriodServiceMonitorable.class);
-
//highlight financial financial transactions
- addMonthColor();
+ addStripingColor();
addBlockColor();
}
- /*
+ /**
* Color the background row in grey if the month number is even (pair in french)
*/
- protected void addMonthColor() {
- HighlightPredicate predicate = new HighlightPredicate() {
- @Override
- public boolean isHighlighted(Component renderer,
- ComponentAdapter adapter) {
- ClosedPeriodicEntryBook closedPeriodicEntryBook
- = (ClosedPeriodicEntryBook) model.getElementAt(adapter.row);
- SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM");
- int month = Integer.parseInt(simpleDateFormat.format(
- closedPeriodicEntryBook.getFinancialPeriod().getBeginDate()));
- // true if month is even
- return month % 2 == 0;
-
- }
- };
- colorTransaction =
- new ColorHighlighter(predicate, new Color(222, 222, 222), null);
+ protected void addStripingColor() {
+ Highlighter colorTransaction = HighlighterFactory.createSimpleStriping(new Color(233,233,233));
addHighlighter(colorTransaction);
}
- /*
- * Color the font in red if period are closed
- */
+ /**
+ * Color the font in red if period are closed
+ */
protected void addBlockColor() {
HighlightPredicate predicate = new HighlightPredicate() {
@Override
public boolean isHighlighted(Component renderer,
ComponentAdapter adapter) {
ClosedPeriodicEntryBook closedPeriodicEntryBook =
- new ClosedPeriodicEntryBookImpl();
- ClosedPeriodicEntryBook selectedClosedPeriodicEntryBook =
(ClosedPeriodicEntryBook) model.getElementAt(adapter.row);
- // true if locked
- try {
- closedPeriodicEntryBook =
- financialPeriodService.getClosedPeriodicEntryBook(
- selectedClosedPeriodicEntryBook.getEntryBook(),
- selectedClosedPeriodicEntryBook.getFinancialPeriod());
- } catch (LimaException eee) {
- log.debug("Can't get closePeriodicEntryBook", eee);
- }
return closedPeriodicEntryBook.getLocked();
}
};
- colorTransaction =
+ Highlighter colorTransaction =
new ColorHighlighter(predicate, null, new Color(222, 0, 0));
addHighlighter(colorTransaction);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2012-04-13 13:46:24 UTC (rev 3366)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2012-04-13 14:44:59 UTC (rev 3367)
@@ -25,77 +25,63 @@
package org.chorem.lima.ui.financialperiod;
-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.monitorable.FinancialPeriodServiceMonitorable;
-import org.chorem.lima.business.monitorable.FiscalPeriodServiceMonitorable;
-import org.chorem.lima.business.monitorable.ImportServiceMonitorable;
-import org.chorem.lima.business.utils.FinancialPeriodComparator;
-import org.chorem.lima.entity.ClosedPeriodicEntryBook;
-import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.service.LimaServiceFactory;
+import static org.nuiton.i18n.I18n._;
-import javax.swing.table.AbstractTableModel;
+import java.text.DateFormat;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
-import static org.nuiton.i18n.I18n._;
+import javax.swing.table.AbstractTableModel;
+import org.chorem.lima.entity.ClosedPeriodicEntryBook;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+
/**
- * TODO add comment here.
+ * Financial period table model.
*
* @author chatellier
* @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
+ *
+ * Last update : $Date$
+ * By : $Author$
*/
-public class FinancialPeriodTableModel extends AbstractTableModel implements ServiceListener {
+public class FinancialPeriodTableModel extends AbstractTableModel {
/** serialVersionUID. */
private static final long serialVersionUID = 77027335135838258L;
- private static final Log log =
- LogFactory.getLog(FinancialPeriodTableModel.class);
-
- /** service */
- protected FinancialPeriodServiceMonitorable financialPeriodService;
-
/** Datas cache */
- protected List<Object> cacheDataList;
+ protected List<ClosedPeriodicEntryBook> closedPeriodicEntryBooks;
public FinancialPeriodTableModel() {
- financialPeriodService =
- LimaServiceFactory.getService(
- FinancialPeriodServiceMonitorable.class);
- LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this);
- LimaServiceFactory.addServiceListener(FiscalPeriodServiceMonitorable.class, this);
+
}
+ /**
+ * Update model data list.
+ *
+ * @param closedPeriodicEntryBooks new data
+ */
+ public void setClosedPeriodicEntryBooks(List<ClosedPeriodicEntryBook> closedPeriodicEntryBooks) {
+ this.closedPeriodicEntryBooks = closedPeriodicEntryBooks;
+ fireTableDataChanged();
+ }
@Override
public int getRowCount() {
int result = 0;
-
- if (cacheDataList != null) {
- result = cacheDataList.size();
+ if (closedPeriodicEntryBooks != null) {
+ result = closedPeriodicEntryBooks.size();
}
-
return result;
}
-
@Override
public int getColumnCount() {
return 3;
}
-
@Override
public String getColumnName(int columnIndex) {
@@ -103,111 +89,69 @@
switch (columnIndex) {
case 0:
- result = _("lima.table.period");
+ result = _("lima.ui.financialperiod.period");
break;
case 1:
- result = _("lima.table.entrybook");
+ result = _("lima.ui.financialperiod.entrybook");
break;
case 2:
- result = _("lima.table.closure");
+ result = _("lima.ui.financialperiod.closure");
break;
}
return result;
}
-
@Override
public Class<?> getColumnClass(int columnIndex) {
// both String
return String.class;
}
-
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return false;
}
- public ClosedPeriodicEntryBook getFinancialPeriodAtRow(int row) throws LimaException {
- return (ClosedPeriodicEntryBook) cacheDataList.get(row);
- }
-
-
- public Object getElementAt(int row) {
-
- Object currentRow = cacheDataList.get(row);
+ public ClosedPeriodicEntryBook getElementAt(int row) {
+ ClosedPeriodicEntryBook currentRow = closedPeriodicEntryBooks.get(row);
return currentRow;
}
-
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
Object result = null;
- ClosedPeriodicEntryBook closedPeriodicEntryBook
- = (ClosedPeriodicEntryBook) cacheDataList.get(rowIndex);
+ ClosedPeriodicEntryBook closedPeriodicEntryBook = closedPeriodicEntryBooks.get(rowIndex);
- if (closedPeriodicEntryBook != null) {
- EntryBook entryBook = closedPeriodicEntryBook.getEntryBook();
- FinancialPeriod financialPeriod =
- closedPeriodicEntryBook.getFinancialPeriod();
-
- SimpleDateFormat simpleDateFormat
- = new SimpleDateFormat("dd MMM yyyy");
-
- switch (columnIndex) {
- case 0:
- result = simpleDateFormat.format(financialPeriod.getBeginDate())
- + " - " + simpleDateFormat.format(financialPeriod.getEndDate());
- break;
- case 1:
- result = entryBook.getCode() + " - " + entryBook.getLabel();
- break;
- case 2:
- if (closedPeriodicEntryBook.getLocked()) {
- result = _("lima.common.closed");
- } else {
- result = _("lima.common.open");
- }
- break;
- }
+ switch (columnIndex) {
+ case 0:
+ // FIXME echatellier 20120413 remove hardcoded french date format
+ DateFormat df = new SimpleDateFormat("dd MMM yyyy");
+ FinancialPeriod financialPeriod = closedPeriodicEntryBook.getFinancialPeriod();
+ result = df.format(financialPeriod.getBeginDate())
+ + " - " + df.format(financialPeriod.getEndDate());
+ break;
+ case 1:
+ EntryBook entryBook = closedPeriodicEntryBook.getEntryBook();
+ result = entryBook.getCode() + " - " + entryBook.getLabel();
+ break;
+ case 2:
+ if (closedPeriodicEntryBook.getLocked()) {
+ result = _("lima.common.closed");
+ } else {
+ result = _("lima.common.open");
+ }
+ break;
}
+
return result;
}
- public List<Object> getDataList() {
- List<Object> results =
- new ArrayList<Object>();
- try {
- List<ClosedPeriodicEntryBook> closedPeriodicEntryBook = financialPeriodService.//getAllClosedPeriodicEntryBooks();
- getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod();
- Collections.sort(closedPeriodicEntryBook, new FinancialPeriodComparator());
- results.addAll(closedPeriodicEntryBook);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't get closedperiodicentrybook list", eee);
- }
- }
- return results;
- }
-
- public void refresh() {
- cacheDataList = getDataList();
- fireTableDataChanged();
- }
-
- public void blockFinancialPeriod(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException {
+ /*public void blockFinancialPeriod(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException {
financialPeriodService.
blockClosedPeriodicEntryBook(closedPeriodicEntryBook);
refresh();
- }
+ }*/
-
- @Override
- public void notifyMethod(String serviceName, String methodeName) {
- if (methodeName.contains("FiscalPeriod") || methodeName.contains("importAll")) {
- refresh();
- }
- }
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2012-04-13 13:46:24 UTC (rev 3366)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodView.jaxx 2012-04-13 14:44:59 UTC (rev 3367)
@@ -5,7 +5,7 @@
$Id$
$HeadURL$
%%
- Copyright (C) 2008 - 2010 CodeLutin
+ 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
@@ -32,32 +32,27 @@
org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel
</import>
- <FinancialPeriodViewHandler id="handler"
- javaBean="new FinancialPeriodViewHandler(this)"/>
+ <FinancialPeriodViewHandler id="handler" constructorParams="this"/>
<Boolean id="selectedPeriod" javaBean="false"/>
- <script>
- <![CDATA[
-
+ <script><![CDATA[
void $afterCompleteSetup() {
- getHandler().refresh();
- }
-
- ]]>
- </script>
+ getHandler().init();
+ }
+ ]]></script>
+
<row>
<cell fill="both" weightx="1" weighty="1">
<JScrollPane>
- <FinancialPeriodTableModel
- id="modelFinancialPeriodTable"/>
+ <FinancialPeriodTableModel id="financialPeriodTableModel"/>
<FinancialPeriodTable
id="financialPeriodTable" sortable="false" rowHeight="24"
constructorParams="getHandler()"
- model="{getModelFinancialPeriodTable()}"
+ model="{financialPeriodTableModel}"
selectionMode="{ListSelectionModel.SINGLE_INTERVAL_SELECTION}"
columnControlVisible="true"/>
<ListSelectionModel
- javaBean="getFinancialPeriodTable().getSelectionModel()"
+ javaBean="financialPeriodTable.getSelectionModel()"
onValueChanged="setSelectedPeriod(financialPeriodTable.getSelectedRow() != -1)"/>
</JScrollPane>
</cell>
@@ -65,7 +60,7 @@
<Table>
<row>
<cell>
- <JButton id="blockButton" text="lima.charts.financialperiod.block"
+ <JButton text="lima.ui.financialperiod.block"
enabled="{isSelectedPeriod()}"
onActionPerformed="getHandler().blockFinancialPeriod();"/>
</cell>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2012-04-13 13:46:24 UTC (rev 3366)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2012-04-13 14:44:59 UTC (rev 3367)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2008 - 2010 CodeLutin
+ * 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
@@ -25,40 +25,74 @@
package org.chorem.lima.ui.financialperiod;
+import static org.nuiton.i18n.I18n._;
+
+import java.util.Collections;
+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.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.business.utils.FinancialPeriodComparator;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
-import org.chorem.lima.util.DialogHelper;
+import org.chorem.lima.service.LimaServiceFactory;
import org.jdesktop.swingx.JXTable;
-import javax.swing.JOptionPane;
-
-import static org.nuiton.i18n.I18n._;
-
/**
- * TODO add comment here.
+ * Handler for FinancialPeriodView.
*
* @author chatellier
* @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
+ *
+ * Last update : $Date$
+ * By : $Author$
*/
-public class FinancialPeriodViewHandler {
+public class FinancialPeriodViewHandler implements ServiceListener {
private static final Log log = LogFactory.getLog(FinancialPeriodViewHandler.class);
+ protected FinancialPeriodService financialPeriodService;
+
protected FinancialPeriodView view;
- protected FinancialPeriodTable table;
-
- protected FinancialPeriodTableModel tableModel;
-
protected FinancialPeriodViewHandler(FinancialPeriodView view) {
this.view = view;
+
+ financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class);
+ LimaServiceFactory.addServiceListener(ImportService.class, this);
+ LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this);
}
+ /**
+ * Init view.
+ */
+ public void init() {
+ try {
+ // get data from service
+ List<ClosedPeriodicEntryBook> closedPeriodicEntryBooks = financialPeriodService.
+ getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod();
+ Collections.sort(closedPeriodicEntryBooks, new FinancialPeriodComparator());
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Loaded %d closed periodic entry book", closedPeriodicEntryBooks.size()));
+ }
+
+ // notify ui
+ view.getFinancialPeriodTableModel().setClosedPeriodicEntryBooks(closedPeriodicEntryBooks);
+ } catch (LimaException ex) {
+ throw new LimaRuntimeException("Can't get closed periodic eb list", ex);
+ }
+ }
+
+ /**
+ * Block selected period.
+ */
public void blockFinancialPeriod() {
JXTable financialPeriodeTable = view.getFinancialPeriodTable();
int selectedRow = financialPeriodeTable.getSelectedRow();
@@ -66,27 +100,24 @@
// blocked it
try {
- ClosedPeriodicEntryBook closedPeriodicEntryBook = model.getFinancialPeriodAtRow(selectedRow);
- int response = JOptionPane.showConfirmDialog(view, _("lima.charts.financialperiod.question.blocked"),
- _("lima.common.question"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+ ClosedPeriodicEntryBook closedPeriodicEntryBook = model.getElementAt(selectedRow);
+ int response = JOptionPane.showConfirmDialog(view, _("lima.ui.financialperiod.blockmessage"),
+ _("lima.ui.financialperiod.blocktitle"),
+ JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
- model.blockFinancialPeriod(closedPeriodicEntryBook);
+ financialPeriodService.blockClosedPeriodicEntryBook(closedPeriodicEntryBook);
+ model.fireTableRowsUpdated(selectedRow, selectedRow);
}
} catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't block financialperiod", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
+ throw new LimaRuntimeException("Can't block financialperiod", eee);
}
}
- public FinancialPeriodView getView() {
- return view;
+ @Override
+ public void notifyMethod(String serviceName, String methodName) {
+ if (serviceName.contains("FiscalPeriod") || methodName.contains("importAll")) {
+ init();
+ }
}
-
- public void refresh() {
- tableModel = (FinancialPeriodTableModel) getView().getFinancialPeriodTable().getModel();
- tableModel.refresh();
- }
}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/package-info.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/package-info.java 2012-04-13 14:44:59 UTC (rev 3367)
@@ -0,0 +1,30 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+/**
+ * Gestion des périodes comptables.
+ *
+ * Affichage, et cloture par période.
+ */
+package org.chorem.lima.ui.financialperiod;
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-04-13 13:46:24 UTC (rev 3366)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-04-13 14:44:59 UTC (rev 3367)
@@ -293,6 +293,12 @@
lima.ui.entrybook.label=
lima.ui.entrybook.remove=
lima.ui.entrybook.update=
+lima.ui.financialperiod.block=
+lima.ui.financialperiod.blockmessage=
+lima.ui.financialperiod.blocktitle=
+lima.ui.financialperiod.closure=
+lima.ui.financialperiod.entrybook=
+lima.ui.financialperiod.period=
lima.ui.financialtransaction.account=
lima.ui.financialtransaction.balance=
lima.ui.financialtransaction.buttonback=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-04-13 13:46:24 UTC (rev 3366)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-04-13 14:44:59 UTC (rev 3367)
@@ -272,6 +272,12 @@
lima.ui.entrybook.label=Libellé
lima.ui.entrybook.remove=Supprimer
lima.ui.entrybook.update=Modifier
+lima.ui.financialperiod.block=Cloturer une période
+lima.ui.financialperiod.blockmessage=Êtes vous sûre de vouloir clôturer cette période ? Cette action est irréversible \!
+lima.ui.financialperiod.blocktitle=Clôture
+lima.ui.financialperiod.closure=Clôture
+lima.ui.financialperiod.entrybook=Journal
+lima.ui.financialperiod.period=Période
lima.ui.financialtransaction.account=Compte
lima.ui.financialtransaction.balance=Balance
lima.ui.financialtransaction.buttonback=←
@@ -296,7 +302,7 @@
lima.ui.fiscalperiod.block.confirmation=Ètes vous sûre de vouloir clôturer cette période ? Cette action est irréversible \!
lima.ui.fiscalperiod.block.newyear=Voulez vous créer un nouvel exercice?
lima.ui.fiscalperiod.block.retainedearningstitle=Report à nouveau
-lima.ui.fiscalperiod.block.title=Cloture de l'excercice
+lima.ui.fiscalperiod.block.title=Cloture de l'exercice
lima.ui.fiscalperiod.closed=Cloturé
lima.ui.fiscalperiod.closure=Cloture
lima.ui.fiscalperiod.fiscalperiod=Exercice
1
0
Author: echatellier
Date: 2012-04-13 15:46:24 +0200 (Fri, 13 Apr 2012)
New Revision: 3366
Url: http://chorem.org/repositories/revision/lima/3366
Log:
Refatoring de la saisie des ?\195?\169critures
Added:
trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookListRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodListRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/GenericComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/package-info.java
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/EntryBookListRenderer.java
Modified:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java
trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/pom.xml
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.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/SubAccountComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
trunk/lima-swing/src/main/resources/log4j.properties
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ServiceMonitorable.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -26,6 +26,7 @@
package org.chorem.lima.business;
+
public interface ServiceMonitorable {
void addServiceListener(ServiceListener l);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -136,14 +136,14 @@
/** Return the list of all financial transaction of a financial period */
@Override
- public List<FinancialTransaction> getAllFinancialTransactionsForFinancialPeriod(
+ public List<FinancialTransaction> getAllFinancialTransactions(
FinancialPeriod period) throws LimaException {
- return getAllFinancialTransactionsForEntryBookAndFinancialPeriod(null, period);
+ return getAllFinancialTransactions(period, null);
}
/** Return the list of all financial transaction from two dates */
@Override
- public List<FinancialTransaction> getAllFinancialTransactionsFromDateToDate(
+ public List<FinancialTransaction> getAllFinancialTransactions(
Date beginDate, Date endDate) throws LimaException {
List<FinancialTransaction> financialTransactions = null;
TopiaContext topiaTransaction = beginTransaction(rootContext);
@@ -178,7 +178,7 @@
/** Return the list of all financial transaction of a financial period and an entrybook */
@Override
- public List<FinancialTransaction> getAllFinancialTransactionsForEntryBookAndFinancialPeriod(EntryBook entryBook, FinancialPeriod financialPeriod) throws LimaException {
+ public List<FinancialTransaction> getAllFinancialTransactions(FinancialPeriod financialPeriod, EntryBook entryBook) throws LimaException {
List<FinancialTransaction> financialTransactions = null;
TopiaContext topiaTransaction = beginTransaction(rootContext);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/EntryComparator.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2008 - 2010 CodeLutin
+ * 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
Modified: trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -148,9 +148,12 @@
}
protected <M> M newService(Class<M> serviceMonitorableClass) {
- M result;
Object ejbHome;
String serviceName = serviceMonitorableClass.getSimpleName().replace("Monitorable", "Impl");
+ // only usefull during non monitorable transition
+ if (!serviceName.endsWith("Impl")) {
+ serviceName += "Impl";
+ }
try {
ejbHome = container.getContext().lookup(NAMESPACE + serviceName);
} catch (NamingException eee) {
@@ -160,7 +163,7 @@
}
InvocationHandler handler = new ServiceMonitorableHandler(ejbHome);
ClassLoader classLoader = serviceMonitorableClass.getClassLoader();
- result = (M) Proxy.newProxyInstance(
+ M result = (M) Proxy.newProxyInstance(
classLoader,
new Class[]{ServiceMonitorable.class, serviceMonitorableClass},
handler
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -55,13 +55,11 @@
void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
- List<FinancialTransaction> getAllFinancialTransactionsForFinancialPeriod(FinancialPeriod period) throws LimaException;
+ List<FinancialTransaction> getAllFinancialTransactions(FinancialPeriod period) throws LimaException;
- List<FinancialTransaction> getAllFinancialTransactionsFromDateToDate(Date beginDate,
- Date endDate) throws LimaException;
+ List<FinancialTransaction> getAllFinancialTransactions(Date beginDate, Date endDate) throws LimaException;
- List<FinancialTransaction> getAllFinancialTransactionsForEntryBookAndFinancialPeriod(EntryBook entryBook,
- FinancialPeriod period) throws LimaException;
+ List<FinancialTransaction> getAllFinancialTransactions(FinancialPeriod period, EntryBook entryBook) throws LimaException;
List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException;
Added: trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryImpl.java (rev 0)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryImpl.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,47 @@
+/*
+ * #%L
+ * Lima callao
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.entity;
+
+import java.math.BigDecimal;
+
+/**
+ * Define default value for entry entity.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class EntryImpl extends EntryAbstract {
+
+ private static final long serialVersionUID = 7016948394597245796L;
+
+ public EntryImpl() {
+ setAmount(BigDecimal.ZERO);
+ }
+
+} //EntryImpl
Property changes on: trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionImpl.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -46,11 +46,11 @@
@Override
public BigDecimal getAmountDebit() {
BigDecimal result = new BigDecimal(0);
- for (Entry entryFT : getEntry()) {
+ /*for (Entry entryFT : getEntry()) {
if (entryFT.isDebit()) {
result.add(entryFT.getAmount());
}
- }
+ }*/
return result;
}
@@ -60,11 +60,11 @@
@Override
public BigDecimal getAmountCredit() {
BigDecimal result = new BigDecimal(0);
- for (Entry entryFT : getEntry()) {
+ /*for (Entry entryFT : getEntry()) {
if (!entryFT.isDebit()) {
result.add(entryFT.getAmount());
}
- }
+ }*/
return result;
}
}
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/pom.xml 2012-04-13 13:46:24 UTC (rev 3366)
@@ -18,6 +18,12 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>lima-business-api</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
<artifactId>lima-business</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -50,8 +50,7 @@
import org.chorem.lima.business.LimaRuntimeException;
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.enums.AccountsChartEnum;
import org.chorem.lima.enums.ImportExportEnum;
@@ -111,8 +110,8 @@
public AccountViewHandler(AccountView view) {
this.view = view;
// Gets factory service
- LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this);
- accountService = LimaServiceFactory.getService(AccountServiceMonitorable.class);
+ LimaServiceFactory.addServiceListener(ImportService.class, this);
+ accountService = LimaServiceFactory.getService(AccountService.class);
}
/**
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-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -34,7 +34,6 @@
import org.chorem.lima.business.monitorable.ImportServiceMonitorable;
import org.chorem.lima.entity.Account;
import org.chorem.lima.service.LimaServiceFactory;
-import org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel;
import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;
@@ -47,7 +46,7 @@
private static final long serialVersionUID = 1L;
private static final Log log =
- LogFactory.getLog(FinancialPeriodTableModel.class);
+ LogFactory.getLog(AccountComboBoxModel.class);
protected Object selectedAccount;
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-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -34,7 +34,6 @@
import org.chorem.lima.business.monitorable.ImportServiceMonitorable;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.service.LimaServiceFactory;
-import org.chorem.lima.ui.financialperiod.FinancialPeriodTableModel;
import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;
@@ -54,7 +53,7 @@
private static final long serialVersionUID = 1L;
private static final Log log =
- LogFactory.getLog(FinancialPeriodTableModel.class);
+ LogFactory.getLog(EntryBookComboBoxModel.class);
protected Object selectedEntryBook;
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-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -36,7 +36,6 @@
import org.chorem.lima.entity.FinancialPeriod;
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;
@@ -56,7 +55,7 @@
private static final long serialVersionUID = 1L;
private static final Log log =
- LogFactory.getLog(FinancialPeriodTableModel.class);
+ LogFactory.getLog(FinancialPeriodComboBoxModel.class);
protected Object selectedFinancialPeriod;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -40,8 +40,9 @@
import java.util.ArrayList;
import java.util.List;
-/** Account combo box model. */
-
+/**
+ * Account combo box model.
+ */
public class SubAccountComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener {
private static final long serialVersionUID = 1L;
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookComboBoxModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,40 @@
+/*
+ * #%L
+ * Lima Swing
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 org.chorem.lima.entity.EntryBook;
+
+/**
+ * Entry book combo model.
+ *
+ * @author chatellier
+ * @version $Revision$
+ */
+public class EntryBookComboBoxModel extends GenericComboBoxModel<EntryBook> {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 6991293987668268456L;
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookComboBoxModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Copied: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookListRenderer.java (from rev 3360, trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/EntryBookListRenderer.java)
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookListRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookListRenderer.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,61 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.chorem.lima.ui.common;
+
+import java.awt.Component;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JList;
+
+import org.chorem.lima.entity.EntryBook;
+
+/**
+ * EntryBook renderer for fiscal period retaining earning list.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class EntryBookListRenderer extends DefaultListCellRenderer {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -9089182547408397051L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value,
+ int index, boolean isSelected, boolean cellHasFocus) {
+
+ EntryBook entryBook = (EntryBook)value;
+ Object newValue = entryBook;
+ if (entryBook != null) {
+ newValue = entryBook.getCode() + " - " + entryBook.getLabel();
+ }
+ return super.getListCellRendererComponent(list, newValue, index, isSelected,
+ cellHasFocus);
+ }
+}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodComboBoxModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,40 @@
+/*
+ * #%L
+ * Lima Swing
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 org.chorem.lima.entity.FinancialPeriod;
+
+/**
+ * Financial period combo model.
+ *
+ * @author chatellier
+ * @version $Revision$
+ */
+public class FinancialPeriodComboBoxModel extends GenericComboBoxModel<FinancialPeriod> {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 6991293987668268456L;
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodComboBoxModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodListRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodListRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodListRenderer.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,64 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.chorem.lima.ui.common;
+
+import java.awt.Component;
+import java.text.DateFormat;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JList;
+
+import org.chorem.lima.entity.FinancialPeriod;
+
+/**
+ * Financial period list renderer.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FinancialPeriodListRenderer extends DefaultListCellRenderer {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -9089182547408397051L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value,
+ int index, boolean isSelected, boolean cellHasFocus) {
+
+ FinancialPeriod financialPeriod = (FinancialPeriod)value;
+ Object newValue = financialPeriod;
+ if (financialPeriod != null) {
+ DateFormat df = DateFormat.getDateInstance();
+ newValue = df.format(financialPeriod.getBeginDate()) + " - " + df.format(financialPeriod.getEndDate());
+ }
+ return super.getListCellRendererComponent(list, newValue, index, isSelected,
+ cellHasFocus);
+ }
+
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodListRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodComboBoxModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,44 @@
+/*
+ * #%L
+ * Lima Swing
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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.common;
+
+import org.chorem.lima.entity.FiscalPeriod;
+
+/**
+ * Model des exercices comptable.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FiscalPeriodComboBoxModel extends GenericComboBoxModel<FiscalPeriod> {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3017195549616278980L;
+
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodComboBoxModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,64 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.chorem.lima.ui.common;
+
+import java.awt.Component;
+import java.text.DateFormat;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JList;
+
+import org.chorem.lima.entity.FiscalPeriod;
+
+/**
+ * Fiscal period list renderer.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FiscalPeriodListRenderer extends DefaultListCellRenderer {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -9089182547408397051L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value,
+ int index, boolean isSelected, boolean cellHasFocus) {
+
+ FiscalPeriod fiscalPeriod = (FiscalPeriod)value;
+ Object newValue = fiscalPeriod;
+ if (fiscalPeriod != null) {
+ DateFormat df = DateFormat.getDateInstance();
+ newValue = df.format(fiscalPeriod.getBeginDate()) + " - " + df.format(fiscalPeriod.getEndDate());
+ }
+ return super.getListCellRendererComponent(list, newValue, index, isSelected,
+ cellHasFocus);
+ }
+
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/GenericComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/GenericComboBoxModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/GenericComboBoxModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,67 @@
+/*
+ * #%L
+ * Lima Swing
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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.common;
+
+import java.util.List;
+
+import javax.swing.DefaultComboBoxModel;
+
+/**
+ * Model generique pour les objects lima.
+ *
+ * @param <E> type d'object géré
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class GenericComboBoxModel<E> extends DefaultComboBoxModel {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 4778917695588663498L;
+
+ protected List<E> objects;
+
+ @Override
+ public int getSize() {
+ int result = 0;
+ if (objects != null) {
+ result = objects.size();
+ }
+ return result;
+ }
+
+ @Override
+ public Object getElementAt(int index) {
+ return objects.get(index);
+ }
+
+ public void setObjects(List<E> objects) {
+ this.objects = objects;
+ fireContentsChanged(this, 0, objects.size());
+ }
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/GenericComboBoxModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTable.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookTable.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2008 - 2011 CodeLutin
+ * 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
@@ -24,8 +24,6 @@
*/
package org.chorem.lima.ui.entrybook;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.jdesktop.swingx.JXTable;
import java.awt.event.KeyEvent;
@@ -39,10 +37,6 @@
/** serialVersionUID. */
private static final long serialVersionUID = 6228396251512013262L;
- /** log. */
- private static final Log log = LogFactory
- .getLog(EntryBookTable.class);
-
protected EntryBookViewHandler handler;
public EntryBookTable(EntryBookViewHandler handler) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -37,8 +37,7 @@
import org.chorem.lima.business.LimaRuntimeException;
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.entity.EntryBookImpl;
import org.chorem.lima.enums.EntryBooksChartEnum;
@@ -66,10 +65,8 @@
public EntryBookViewHandler(EntryBookView view) {
this.view = view;
- entryBookService =
- LimaServiceFactory.getService(
- EntryBookServiceMonitorable.class);
- LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this);
+ entryBookService = LimaServiceFactory.getService(EntryBookService.class);
+ LimaServiceFactory.addServiceListener(ImportService.class, this);
}
public void init() {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsView.jaxx 2012-04-13 13:46:24 UTC (rev 3366)
@@ -35,7 +35,7 @@
<EntryBooksReportsViewHandler id="handler"
javaBean="new EntryBooksReportsViewHandler(this)"/>
<Boolean id="selectedRow" javaBean="false"/>
- <EntryBookComboBoxModel id="modelEntryBook"/>
+ <org.chorem.lima.ui.combobox.EntryBookComboBoxModel id="modelEntryBook"/>
<EntryBooksReportsTableModel id="modelTable"/>
<script>
<![CDATA[
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2008 - 2010 CodeLutin
+ * 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
@@ -62,14 +62,8 @@
/** serialVersionUID. */
private static final long serialVersionUID = 3133690382049594727L;
-// /** log. */
-// private static final Log log = LogFactory
-// .getLog(FinancialTransactionTable.class);
-
protected FinancialTransactionViewHandler handler;
-// private ColorHighlighter colorBalance;
-
private int x_tab;
private int y_tab;
@@ -148,238 +142,6 @@
return handler;
}
-// /**
-// * Cette méthode permet de colorer toutes les transactions dans le tableau
-// * afin de bien distinguer les transactions et entrées comptables.
-// * On récupère la première cellule, on vérifie que c'est une date
-// */
-// protected void addColorTransaction() {
-// if (colorTransaction != null) {
-// removeHighlighter(colorTransaction);
-// }
-// HighlightPredicate predicate = new HighlightPredicate() {
-// @Override
-// public boolean isHighlighted(Component renderer,
-// ComponentAdapter adapter) {
-// return adapter.getValueAt(adapter.row, 0) instanceof Date;
-// }
-// };
-// colorTransaction =
-// new ColorHighlighter(predicate, new Color(222, 222, 222), null);
-// addHighlighter(colorTransaction);
-// }
-
-// /**
-// * Permet de surligner une transaction dans le tableau lorsque
-// * cette dernière n'est pas équilibrée.
-// * On récupère la dernière cellule de la ligne
-// * et on vérifie si la valeur est différente de 0
-// */
-// protected void addColorNonBalancedTransaction() {
-// if (colorBalance != null) {
-// removeHighlighter(colorBalance);
-// }
-// HighlightPredicate predicate = new HighlightPredicate() {
-// @Override
-// public boolean isHighlighted(Component renderer,
-// ComponentAdapter adapter) {
-// boolean isHighlighted = false;
-// Object value = adapter.getValueAt(adapter.row, 8);
-// if (value instanceof BigDecimal) {
-// BigDecimal currentBalance = (BigDecimal) value;
-// // can compare two BigDecimals with different scales
-// // e.g: 3.1 == 3.10
-// if (currentBalance.compareTo(BigDecimal.ZERO) != 0) {
-// isHighlighted = true;
-// }
-// }
-// return isHighlighted;
-// }
-// };
-// colorTransaction =
-// new ColorHighlighter(predicate, new Color(255, 198, 209), null);
-// addHighlighter(colorTransaction);
-// }
-
-// /**
-// * for each action combination key are think
-// * for extend keyboard and laptop keyboard
-// */
-// @Override
-// public void keyPressed(KeyEvent e) {
-//
-// //TODO combinaison de touches dans la config
-//
-// // delete selected row with the key : delete or ctrl + clear
-// // ou de l'entree
-// if (e.getKeyCode() == KeyEvent.VK_DELETE
-// || e.getKeyCode() == KeyEvent.VK_CLEAR
-// && e.getModifiers() == KeyEvent.CTRL_MASK) {
-// handler.deleteSelectedRow();
-// }
-//
-// // add entry with the key combination : insert or ctrl + enter
-// if (e.getKeyCode() == KeyEvent.VK_INSERT
-// || e.getKeyCode() == KeyEvent.VK_ENTER
-// && e.getModifiers() == KeyEvent.CTRL_MASK) {
-// handler.addEntry();
-// }
-//
-// // copy : ctrl + c
-//
-// // add financial transaction with the key combination : ctrl + c
-// if (e.getKeyCode() == KeyEvent.VK_C
-// && e.getModifiers() == KeyEvent.CTRL_MASK) {
-// handler.copyRow();
-// }
-//
-// // paste : ctrl + v
-//
-// // add financial transaction with the key combination : ctrl + v
-// if (e.getKeyCode() == KeyEvent.VK_V
-// && e.getModifiers() == KeyEvent.CTRL_MASK) {
-// handler.pasteRow();
-// }
-//
-// // add financial transaction with the key combination : ctrl + tab
-// if (e.getKeyCode() == KeyEvent.VK_TAB
-// && e.getModifiers() == KeyEvent.CTRL_MASK) {
-// handler.addFinancialTransaction();
-// }
-//
-// // clear row selection with the key: escape
-// if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
-// if (!isEditing()) {
-// clearSelection();
-// }
-// }
-//
-// /**
-// * Touche tab
-// * Incrémente le curseur de case tant que la case n'est pas editable
-// * Ajoute une entrée comptable si tab est sur
-// * la dernière cellule et si la transaction est non équilibré
-// * sinon rajoute une transaction
-// */
-//
-// if (e.getKeyChar() == KeyEvent.VK_TAB) {
-// int max_x = getColumnCount();
-// int max_y = getRowCount();
-// x_tab = getSelectedColumn();
-// y_tab = getSelectedRow();
-// Boolean end = true;
-//
-// if (x_tab < max_x - 1) {
-// x_tab++;
-// }
-// //end of row
-// else {
-// x_tab = 0;
-// y_tab++;
-// }
-//
-// //skip all cell while not editable or if end of table add entry or transaction or end of table
-// while (!isCellEditable(y_tab, x_tab) && end) {
-// //if end of row
-// if (x_tab == max_x - 1) {
-// Object object = handler.tableModel.getElementAt(y_tab);
-//
-// //if transaction, add entry
-// if (object instanceof FinancialTransaction) {
-// FinancialTransaction financialTransaction = (FinancialTransaction) object;
-// if (financialTransaction.getEntry().size() == 0) {
-// handler.addEntry();
-// setColumnSelectionInterval(1, 1);
-// }
-// }
-// //if entry
-// else {
-// //FIXME set value is doing after key pressed
-// // so update not terminated before get balanced
-// //Swing Worker stop the UI 500ms
-// // found best solution ?
-// final JXTable table = this;
-// final int y_t = y_tab;
-// final int m_t = max_y;
-// new SwingWorker<Void, Void>() {
-// @Override
-// protected Void doInBackground() throws InterruptedException {
-// Thread.sleep(500);
-// return null;
-// }
-//
-// @Override
-// protected void done() {
-// Object object = handler.tableModel.getElementAt(y_tab - 1);
-// FinancialTransaction financialTransaction = null;
-// if (object instanceof Entry) {
-// financialTransaction = ((Entry) object).getFinancialTransaction();
-// } else if (object instanceof FinancialTransaction) {
-// financialTransaction = (FinancialTransaction) object;
-// }
-// BigDecimal amountC = financialTransaction.getAmountCredit();
-// BigDecimal amountD = financialTransaction.getAmountDebit();
-// if (amountC == amountD) {
-// if (y_t == m_t - 1) {
-// handler.addFinancialTransaction();
-// table.setColumnSelectionInterval(0, 0);
-// }
-// } else {
-// handler.addEntry();
-// table.setColumnSelectionInterval(1, 1);
-// y_tab++;
-// // positionne la sélection sur la nouvelle ligne créée
-// table.setRowSelectionInterval(y_tab, y_tab);
-// x_tab = 0;
-// }
-// }
-// }.execute();
-// }
-// end = false;
-// } else {
-// if (x_tab < max_x) {
-// setRowSelectionInterval(y_tab, y_tab);
-// setColumnSelectionInterval(x_tab, x_tab);
-// x_tab++;
-// }
-// }
-// }
-// }
-// }
-//
-//
-// @Override
-// public void keyTyped(KeyEvent e) {
-// }
-//
-//
-// @Override
-// public void keyReleased(KeyEvent e) {
-// }
-//
-// @Override
-// public void mouseClicked(MouseEvent e) {
-// }
-//
-// @Override
-// public void mousePressed(MouseEvent e) {
-// if (rowAtPoint(e.getPoint()) == -1) {
-// clearSelection();
-// }
-// }
-//
-// @Override
-// public void mouseReleased(MouseEvent e) {
-// }
-//
-// @Override
-// public void mouseEntered(MouseEvent e) {
-// }
-//
-// @Override
-// public void mouseExited(MouseEvent e) {
-// }
-
private class MyKeyAdapter extends KeyAdapter {
@Override
@@ -459,7 +221,7 @@
while (!isCellEditable(y_tab, x_tab) && end) {
//if end of row
if (x_tab == max_x - 1) {
- Object object = handler.getTableModel().getElementAt(y_tab);
+ Object object = handler.view.getFinancialTransactionTableModel().getElementAt(y_tab);
//if transaction, add entry
if (object instanceof FinancialTransaction) {
@@ -486,7 +248,7 @@
@Override
protected void done() {
- Object object = handler.getTableModel().getElementAt(y_tab - 1);
+ Object object = handler.view.getFinancialTransactionTableModel().getElementAt(y_tab - 1);
FinancialTransaction financialTransaction = null;
if (object instanceof Entry) {
financialTransaction = ((Entry) object).getFinancialTransaction();
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -25,116 +25,46 @@
package org.chorem.lima.ui.financialtransaction;
-import org.apache.commons.lang3.time.DateUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaBusinessException;
+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.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.business.LimaRuntimeException;
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.utils.EntryComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.EntryImpl;
-import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransaction;
-import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.service.LimaServiceFactory;
-import org.chorem.lima.util.ErrorHelper;
-import javax.swing.table.AbstractTableModel;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
-import static org.nuiton.i18n.I18n._;
-
/**
* Basic transaction table model.
- * <p/>
- * Le modele est filtré sur {@link #selectedFinancialPeriod} et
- * {@link #selectedFinancialPeriod} (montée en charge !).
*
* @author ore
* @author chatellier
* @version $Revision$
*/
-public class FinancialTransactionTableModel extends AbstractTableModel implements ServiceListener {
+public class FinancialTransactionTableModel extends AbstractTableModel {
- private static final long serialVersionUID = 1L;
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -7495388454688562991L;
- /** log. */
- private static final Log log = LogFactory
- .getLog(FinancialTransactionTableModel.class);
+ /** Service (just to update setValueAt(). */
+ protected FinancialTransactionService financialTransactionService;
- /** Transaction service. */
- protected final FinancialTransactionService financialTransactionService;
+ protected List<Object> transactionAndEntries;
- /** selected financial period */
- protected FinancialPeriod selectedFinancialPeriod;
-
- /** data cache */
- protected List<?> cacheDataList;
-
- protected EntryBook selectedEntryBook;
-
public FinancialTransactionTableModel() {
- /* Services */
- financialTransactionService = LimaServiceFactory.getService(
- FinancialTransactionServiceMonitorable.class);
- LimaServiceFactory.addServiceListener(financialTransactionService, this);
- LimaServiceFactory.addServiceListener(ImportServiceMonitorable.class, this);
+ financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class);
}
- /**
- * Le model est une combinaison de Transaction/Entries.
- *
- * @return
- */
- protected List<?> getDataList() {
- List<Object> results = new ArrayList<Object>();
- if (selectedFinancialPeriod != null) {
- try {
- List<FinancialTransaction> transactions;
-
- if (selectedEntryBook == null) {
-
- // get all transactions for all entry books
- transactions = financialTransactionService.getAllFinancialTransactionsForFinancialPeriod(
- selectedFinancialPeriod);
- } else {
-
- // get all transactions for selected entry book
- transactions = financialTransactionService.getAllFinancialTransactionsForEntryBookAndFinancialPeriod(
- selectedEntryBook,
- selectedFinancialPeriod
- );
- }
-
- for (FinancialTransaction transaction : transactions) {
- results.add(transaction);
- List<Entry> entries = (List<Entry>) transaction.getEntry();
- Collections.sort(entries, new EntryComparator());
- results.addAll(entries);
- }
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't update model", eee);
- }
- ErrorHelper.showErrorDialog("Can't get transaction list", eee);
- }
- }
- return results;
- }
-
- public void refresh() {
- cacheDataList = getDataList();
+ public void setTransactionAndEntries(List<Object> transactionAndEntries) {
+ this.transactionAndEntries = transactionAndEntries;
fireTableDataChanged();
}
@@ -186,31 +116,31 @@
switch (column) {
case 0:
- result = _("lima.table.date");
+ result = _("lima.ui.financialtransaction.date");
break;
case 1:
- result = _("lima.table.entrybook");
+ result = _("lima.ui.financialtransaction.entrybook");
break;
case 2:
- result = _("lima.table.voucher");
+ result = _("lima.ui.financialtransaction.voucher");
break;
case 3:
- result = _("lima.table.account");
+ result = _("lima.ui.financialtransaction.account");
break;
case 4:
- result = _("lima.table.description");
+ result = _("lima.ui.financialtransaction.description");
break;
case 5:
- result = _("lima.table.letter");
+ result = _("lima.ui.financialtransaction.letter");
break;
case 6:
- result = _("lima.table.debit");
+ result = _("lima.ui.financialtransaction.debit");
break;
case 7:
- result = _("lima.table.credit");
+ result = _("lima.ui.financialtransaction.credit");
break;
case 8:
- result = _("lima.table.balance");
+ result = _("lima.ui.financialtransaction.balance");
break;
}
return result;
@@ -218,12 +148,10 @@
@Override
public int getRowCount() {
- int result;
+ int result = 0;
- if (cacheDataList == null) {
- result = 0;
- } else {
- result = cacheDataList.size();
+ if (transactionAndEntries != null) {
+ result = transactionAndEntries.size();
}
return result;
@@ -231,103 +159,85 @@
@Override
public Object getValueAt(int row, int column) {
- Object result = null;
+ Object result = transactionAndEntries.get(row);
- // just prevent too much result
- if (cacheDataList != null) {
- result = cacheDataList.get(row);
+ if (result instanceof FinancialTransaction) {
+ FinancialTransaction currentRow = (FinancialTransaction) result;
+ BigDecimal amountDebit = currentRow.getAmountDebit();
+ BigDecimal amountCredit = currentRow.getAmountCredit();
- if (result instanceof FinancialTransaction) {
- FinancialTransaction currentRow = (FinancialTransaction) result;
- BigDecimal amountDebit = currentRow.getAmountDebit();
- BigDecimal amountCredit = currentRow.getAmountCredit();
-
- switch (column) {
- case 0:
- result = currentRow.getTransactionDate();
- break;
- case 1:
- if (currentRow.getEntryBook() != null) {
- result = currentRow.getEntryBook().getCode();
- } else {
- result = null;
- }
- break;
- case 2:
- result = null; //voucher
- break;
- case 3:
- result = null; // account
- break;
- case 4:
- result = null; // description
- break;
- case 5:
- result = null; // letter
- break;
- case 6:
- result = amountDebit;
- break;
- case 7:
- result = amountCredit;
- break;
- case 8:
- result = amountDebit.subtract(amountCredit);
- break;
- }
- } else if (result instanceof Entry) {
- Entry currentEntry = (Entry) result;
- switch (column) {
- case 0:
- result = null; // date
- break;
- case 1: // entry book
+ switch (column) {
+ case 0:
+ result = currentRow.getTransactionDate();
+ break;
+ case 1:
+ if (currentRow.getEntryBook() != null) {
+ result = currentRow.getEntryBook().getCode();
+ } else {
result = null;
- break;
- case 2:
- result = currentEntry.getVoucher();
- break;
- case 3: // account
- if (currentEntry.getAccount() != null) {
- result = currentEntry.getAccount().getAccountNumber();
- } else {
- result = null;
- }
- break;
- case 4:
- result = currentEntry.getDescription();
- break;
- case 5:
- result = currentEntry.getLettering();
- break;
- case 6:
- result = currentEntry.getDebit() ? currentEntry.getAmount() : BigDecimal.ZERO;
- break;
- case 7:
- result = currentEntry.getDebit() ? BigDecimal.ZERO : currentEntry.getAmount();
- break;
- case 8:
+ }
+ break;
+ case 2:
+ result = null; //voucher
+ break;
+ case 3:
+ result = null; // account
+ break;
+ case 4:
+ result = null; // description
+ break;
+ case 5:
+ result = null; // letter
+ break;
+ case 6:
+ result = amountDebit;
+ break;
+ case 7:
+ result = amountCredit;
+ break;
+ case 8:
+ result = amountDebit.subtract(amountCredit);
+ break;
+ }
+ } else if (result instanceof Entry) {
+ Entry currentEntry = (Entry) result;
+ switch (column) {
+ case 0:
+ result = null; // date
+ break;
+ case 1: // entry book
+ result = null;
+ break;
+ case 2:
+ result = currentEntry.getVoucher();
+ break;
+ case 3: // account
+ if (currentEntry.getAccount() != null) {
+ result = currentEntry.getAccount().getAccountNumber();
+ } else {
result = null;
- break;
- }
+ }
+ break;
+ case 4:
+ result = currentEntry.getDescription();
+ break;
+ case 5:
+ result = currentEntry.getLettering();
+ break;
+ case 6:
+ result = currentEntry.getDebit() ? currentEntry.getAmount() : BigDecimal.ZERO;
+ break;
+ case 7:
+ result = currentEntry.getDebit() ? BigDecimal.ZERO : currentEntry.getAmount();
+ break;
+ case 8:
+ result = null;
+ break;
}
}
return result;
}
- public void setSelectedFinancialPeriod(FinancialPeriod financialPeriod) {
- if (log.isDebugEnabled()) {
- log.debug("New selected financial period " + financialPeriod);
- }
- selectedFinancialPeriod = financialPeriod;
- refresh();
- }
-
- public void setSelectedEntryBook(EntryBook selectedEntryBook) {
- this.selectedEntryBook = selectedEntryBook;
- refresh();
- }
-
/**
* To set cells editable or not
* different condition for entry or financial transaction
@@ -335,22 +245,15 @@
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
boolean editableCell = false;
- Object currentRow = cacheDataList.get(rowIndex);
+ Object currentRow = transactionAndEntries.get(rowIndex);
+ // cells editable for the financialtransaction row, no cells exclude the date
+ if (currentRow instanceof FinancialTransaction && (columnIndex == 0 /*|| columnIndex == 1*/)) {
+ editableCell = true;
+ }
// cells editable for the entry row, all cells exclude the date
if (currentRow instanceof Entry && !(columnIndex == 0 || columnIndex == 1 || columnIndex == 8)) {
editableCell = true;
}
- // cells editable for the financialtransaction row, no cells exclude the date
- if (currentRow instanceof FinancialTransaction && (columnIndex == 0 || columnIndex == 1)) {
-
-// if (selectedEntryBook == null || columnIndex == 0) {
-//
-// // can only edit the transaction entry book only if there is
-// // no entry book selected (otherwise we will loose the transaction
-// editableCell = true;
-// }
- editableCell = true;
- }
return editableCell;
}
@@ -358,13 +261,13 @@
* Obtain the first entry book of the current transaction.
*
* @param selectedRow
- * @return
+ * @return first entry index
*/
public int getFirstEntry(int selectedRow) {
int result = -1;
int currentRow = selectedRow;
while (currentRow > -1) {
- Object o = cacheDataList.get(currentRow);
+ Object o = transactionAndEntries.get(currentRow);
if (o instanceof Entry) {
// current row is still a entry book
@@ -391,166 +294,33 @@
return result;
}
- /**
- * @return int: indexOf new FianancialTransaction
- * @throws LimaException
- */
- public int addFinancialTransaction() throws LimaException {
- /* Calling transaction service */
- FinancialTransaction financialTransaction = new FinancialTransactionImpl();
-
- //if a period is selected
- if (selectedFinancialPeriod == null) {
- throw new LimaBusinessException("No financial period selected");
- }
-
- financialTransaction.setFinancialPeriod(selectedFinancialPeriod);
-
- if (selectedEntryBook != null) {
- financialTransaction.setEntryBook(selectedEntryBook);
- }
-
- // get today
- Calendar actualCalendar = Calendar.getInstance();
-
- // get the financial period date
- Date transactionDate = selectedFinancialPeriod.getBeginDate();
-
- Calendar calEnd = Calendar.getInstance();
- calEnd.setTime(selectedFinancialPeriod.getEndDate());
- int dayMax = calEnd.get(Calendar.DAY_OF_MONTH);
- Calendar calBegin = Calendar.getInstance();
- calBegin.setTime(selectedFinancialPeriod.getBeginDate());
- int dayMin = calBegin.get(Calendar.DAY_OF_MONTH);
- int toDay = actualCalendar.get(Calendar.DAY_OF_MONTH);
-
- if (toDay > dayMax || toDay < dayMin) {
- // change the day
- transactionDate = DateUtils.setDays(transactionDate, dayMax);
- } else {
- // change the day
- transactionDate = DateUtils.setDays(transactionDate, toDay);
- }
-
-
- // set date to the financial transaction
- financialTransaction.setTransactionDate(transactionDate);
- // create it
- FinancialTransaction fTransaction =
- financialTransactionService.createFinancialTransaction(financialTransaction);
-
- //on recharge la liste
- cacheDataList = getDataList();
- int row = cacheDataList.indexOf(fTransaction);
- fireTableRowsInserted(row, row);
- return row;
- }
-
- /**
- * @param voucher
- * @param description
- * @param row
- * @return int: indexOf new Entry
- * @throws LimaException
- */
- public int addEmptyEntry(String voucher,
- String description,
- int row) throws LimaException {
- FinancialTransaction currentTransaction = null;
- Object currentRow = cacheDataList.get(row);
- Entry entry = new EntryImpl();
- entry.setAmount(BigDecimal.ZERO);
- if (voucher != null) {
- entry.setVoucher(voucher);
- }
- if (description != null) {
- entry.setDescription(description);
- }
- //check if current row is a transaction or an entry
- if (currentRow instanceof FinancialTransaction) {
- currentTransaction = (FinancialTransaction) currentRow;
- } else if (currentRow instanceof Entry) {
- Entry currentEntry = (Entry) currentRow;
- //get back the parent transaction of the entry
- currentTransaction = currentEntry.getFinancialTransaction();
- }
- //create it
- entry.setFinancialTransaction(currentTransaction);
- Entry newEntry = financialTransactionService.createEntry(entry);
-
- //on recharge la liste
- cacheDataList = getDataList();
- int newrow = cacheDataList.indexOf(newEntry);
- fireTableRowsInserted(newrow, newrow);
- return newrow;
- }
-
- /**
- * @param entry
- * @param row
- * @return int: indexOf new Entry
- * @throws LimaException
- */
- public int addEntry(Entry entry, int row) throws LimaException {
- FinancialTransaction currentTransaction = null;
- int financialTransactionRow = 0;
- Object currentRow = cacheDataList.get(row);
- //check if current row is a transaction or an entry
- if (currentRow instanceof FinancialTransaction) {
- currentTransaction = (FinancialTransaction) currentRow;
- //update the financial transaction in entire
- financialTransactionRow =
- getDataList().indexOf(currentRow);
- } else if (currentRow instanceof Entry) {
- Entry currentEntry = (Entry) currentRow;
- //get back the parent transaction of the entry
- currentTransaction = currentEntry.getFinancialTransaction();
- //update the financial transaction in entire
- financialTransactionRow =
- getDataList().indexOf(((Entry) currentRow).
- getFinancialTransaction());
- }
- //create it
- entry.setFinancialTransaction(currentTransaction);
- Entry newEntry = financialTransactionService.createEntry(entry);
- fireTableRowsUpdated(financialTransactionRow, getRowCount() - 1);
-
- //on recharge la liste
- cacheDataList = getDataList();
- int newrow = cacheDataList.indexOf(newEntry);
- fireTableRowsInserted(newrow, newrow);
- return newrow;
- }
-
/** to modifiy financialtransaction or entry */
@Override
public void setValueAt(Object value, int row, int column) {
- int financialTransactionRow = 0;
- if (cacheDataList != null) {
- Object currentRow = cacheDataList.get(row);
+
+ try {
+ Object currentRow = transactionAndEntries.get(row);
+
if (currentRow instanceof FinancialTransaction) {
- FinancialTransaction currentFinancialTransaction =
- (FinancialTransaction) currentRow;
+ FinancialTransaction currentFinancialTransaction = (FinancialTransaction) currentRow;
switch (column) {
case 0:
//update
currentFinancialTransaction.setTransactionDate((Date) value);
break;
+ /* FIXME echatellier 20120413 : ca devrait carrement pas être editable
case 1:
if (selectedEntryBook != null) {
-
// not authorized to change the value
return;
}
currentFinancialTransaction.setEntryBook((EntryBook) value);
- break;
+ break;*/
}
+
// update transaction
- updateFinancialTransaction(currentFinancialTransaction);
-
- //update the financial transaction in entire
- financialTransactionRow =
- getDataList().indexOf(currentRow);
+ financialTransactionService.updateFinancialTransaction(currentFinancialTransaction);
+
} else if (currentRow instanceof Entry) {
Entry currentEntry = (Entry) currentRow;
FinancialTransaction financialTransaction =
@@ -559,19 +329,19 @@
switch (column) {
case 2:
String voucher = ((String) value).trim();
-
+
int firstEntryRow = getFirstEntry(row);
if (row == firstEntryRow) {
-
+
// let's update the voucher of all entries of
// the transaction
-
+
for (Entry entry : financialTransaction.getEntry()) {
entry.setVoucher(voucher);
}
updateTransaction = true;
} else {
-
+
// not on first row, just update this entry voucher
currentEntry.setVoucher(voucher);
}
@@ -585,7 +355,7 @@
if (row == firstEntryRow) {
// let's update the description of all entries of
// the transaction
-
+
for (Entry entry : financialTransaction.getEntry()) {
entry.setDescription(description1);
}
@@ -599,16 +369,16 @@
String description = ((String) value).trim();
firstEntryRow = getFirstEntry(row);
if (row == firstEntryRow) {
-
+
// let's update the description of all entries of
// the transaction
-
+
for (Entry entry : financialTransaction.getEntry()) {
entry.setDescription(description);
}
updateTransaction = true;
} else {
-
+
// not on first row, just update this entry description
currentEntry.setDescription(description);
}
@@ -625,86 +395,67 @@
currentEntry.setDebit(false);
break;
}
+
+ // some modification must update all other
+ // first row modification update following rows
if (updateTransaction) {
-
+ // FIXME echatellier 20120413 make a single service call
for (Entry entry : financialTransaction.getEntry()) {
- updateEntry(entry);
+ financialTransactionService.updateEntry(entry);
}
} else {
-
- updateEntry(currentEntry);
+ financialTransactionService.updateEntry(currentEntry);
}
-
- //update the financial transaction in entire
- financialTransactionRow =
- getDataList().indexOf(financialTransaction);
}
- //on recharge la liste
- cacheDataList = getDataList();
- fireTableRowsUpdated(financialTransactionRow, getRowCount() - 1);
- }
- }
+
+ // FIXME echatellier 20120413 une modification des dates fait que l'ordre
+ // devient faux
+ fireTableRowsUpdated(row, row);
- protected void updateFinancialTransaction(FinancialTransaction transaction) {
- try {
- financialTransactionService.updateFinancialTransaction(transaction);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't update financial transaction", eee);
- }
- ErrorHelper.showErrorDialog("Can't update financial transaction", eee);
+ } catch (LimaException ex) {
+ throw new LimaRuntimeException("Can't propagate data modification to service", ex);
}
}
- protected void updateEntry(Entry entry) {
- try {
- financialTransactionService.updateEntry(entry);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't update entry", eee);
- }
- ErrorHelper.showErrorDialog("Can't update entry", eee);
- }
- }
-
public Object getElementAt(int row) {
- Object result = null;
- if (cacheDataList != null) {
- result = cacheDataList.get(row);
- }
+ Object result = transactionAndEntries.get(row);
return result;
}
+
+ public int indexOf(Object o) {
+ return transactionAndEntries.indexOf(o);
+ }
/**
- * Delete selected row in table (could be transaction or entry).
- * <p/>
- * Called by model.
- *
- * @param row
- * @throws LimaException
+ * Delete row.
+ *
+ * @param row row to delete
*/
- public void removeObject(int row) throws LimaException {
- Object currentRow = cacheDataList.get(row);
- if (currentRow instanceof FinancialTransaction) {
- FinancialTransaction currentTransaction =
- (FinancialTransaction) currentRow;
- financialTransactionService.removeFinancialTransaction(currentTransaction);
- } else if (currentRow instanceof Entry) {
- Entry currentEntry = (Entry) currentRow;
- financialTransactionService.removeEntry(currentEntry);
- }
- //on recharge la liste
- cacheDataList = getDataList();
- fireTableDataChanged();
+ public void deleteRow(int row) {
+ transactionAndEntries.remove(row);
+ fireTableRowsDeleted(row, row);
}
- @Override
- public void notifyMethod(String serviceName, String methodeName) {
- if (serviceName.contains("FinancialTransaction") ||
- methodeName.contains("importEntries") ||
- methodeName.contains("importAll")) {
- refresh();
- }
+ /**
+ * Insert new row.
+ *
+ * @param object object to insert
+ * @param newRow position
+ */
+ public void addRow(Object object, int newRow) {
+ transactionAndEntries.add(newRow, object);
+ fireTableRowsInserted(newRow, newRow);
+
}
+ /**
+ * Insert new row.
+ *
+ * @param object
+ */
+ public void addRow(Object object) {
+ transactionAndEntries.add(object);
+ fireTableRowsInserted(transactionAndEntries.size() - 1, transactionAndEntries.size() - 1);
+
+ }
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionView.jaxx 2012-04-13 13:46:24 UTC (rev 3366)
@@ -5,7 +5,7 @@
$Id$
$HeadURL$
%%
- Copyright (C) 2008 - 2010 CodeLutin
+ 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
@@ -22,7 +22,6 @@
<http://www.gnu.org/licenses/gpl-3.0.html>.
#L%
-->
-
<Table>
<import>
@@ -30,62 +29,54 @@
org.chorem.lima.entity.FiscalPeriod
org.chorem.lima.entity.FinancialPeriod
org.chorem.lima.entity.EntryBook
- org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel
- org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel
- org.chorem.lima.ui.LimaRendererUtil
+ org.chorem.lima.ui.common.EntryBookListRenderer
</import>
<FinancialTransactionViewHandler id="handler" constructorParams="this"/>
<Boolean id="selectedRow" javaBean="false"/>
- <FinancialTransactionTableModel id="financialTransactionTableModel"/>
- <FiscalPeriodComboBoxModel id="fiscalPeriodComboBoxModel"/>
- <FinancialPeriodComboBoxModel id="financialPeriodComboBoxModel"/>
<script>
<![CDATA[
void $afterCompleteSetup() {
- handler.initEntryBookModel(entryBookComboBox);
- handler.refresh();
+ handler.init();
}
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
<cell anchor="east">
- <JLabel id="fiscalPeriodLabel" text="lima.charts.fiscalyear"
- labelFor='{fiscalPeriodComboBox}'/>
+ <JLabel text="lima.ui.financialtransaction.fiscalyear" labelFor='{fiscalPeriodComboBox}'/>
</cell>
<cell anchor="west">
-
- <JComboBox id="fiscalPeriodComboBox"
- model="{fiscalPeriodComboBoxModel}"
- renderer="{LimaRendererUtil.newDecoratorListCellRenderer(FiscalPeriod.class)}"
- onItemStateChanged="if ( event.getStateChange() == 1 ) financialPeriodComboBoxModel.setSelectedFiscalPeriod( (FiscalPeriod) event.getItem() );"/>
+ <org.chorem.lima.ui.common.FiscalPeriodComboBoxModel id="fiscalPeriodComboBoxModel"/>
+ <JComboBox id="fiscalPeriodComboBox" model="{fiscalPeriodComboBoxModel}"
+ renderer="{new org.chorem.lima.ui.common.FiscalPeriodListRenderer()}"
+ onItemStateChanged="handler.fiscalPeriodSelected(event)"/>
</cell>
<cell anchor="east">
- <JLabel id="financialPeriodLabel" text="lima.common.period"
- labelFor='{financialPeriodComboBox}'/>
+ <JLabel text="lima.ui.financialtransaction.financialperiod" labelFor='{financialPeriodComboBox}'/>
</cell>
<cell anchor="west">
<JPanel>
+ <org.chorem.lima.ui.common.FinancialPeriodComboBoxModel id="financialPeriodComboBoxModel"/>
<JComboBox id="financialPeriodComboBox"
model="{financialPeriodComboBoxModel}"
- renderer="{LimaRendererUtil.newDecoratorListCellRenderer(FinancialPeriod.class)}"
- onItemStateChanged="if ( event.getStateChange() == 1 ) financialTransactionTableModel.setSelectedFinancialPeriod( (FinancialPeriod) event.getItem() );"/>
- <JButton id="back" text="lima.common.buttonback"
+ renderer="{new org.chorem.lima.ui.common.FinancialPeriodListRenderer()}"
+ onItemStateChanged="handler.financialPeriodSelected(event)"/>
+ <JButton id="back" text="lima.ui.financialtransaction.buttonback"
onActionPerformed="handler.back(financialPeriodComboBox)"/>
- <JButton id="next" text="lima.common.buttonnext"
+ <JButton id="next" text="lima.ui.financialtransaction.buttonnext"
onActionPerformed="handler.next(financialPeriodComboBox)"/>
</JPanel>
</cell>
<cell anchor="east">
- <JLabel id="entryBookComboBoxLabel" text="lima.common.entrybook"
- labelFor='{entryBookComboBox}'/>
+ <JLabel text="lima.ui.financialtransaction.entrybook" labelFor='{entryBookComboBox}'/>
</cell>
<cell anchor="west">
- <JComboBox id="entryBookComboBox"
- renderer="{LimaRendererUtil.newDecoratorListCellRenderer(EntryBook.class)}"
- onItemStateChanged="if ( event.getStateChange() == 1 ) financialTransactionTableModel.setSelectedEntryBook( (EntryBook) event.getItem() );"/>
+ <org.chorem.lima.ui.common.EntryBookComboBoxModel id="entryBookComboBoxModel"/>
+ <JComboBox id="entryBookComboBox" model="{entryBookComboBoxModel}"
+ renderer="{new org.chorem.lima.ui.common.EntryBookListRenderer()}"
+ onItemStateChanged="handler.entryBookSelected(event)"/>
</cell>
</row>
<row>
@@ -110,7 +101,7 @@
<row>
<cell fill="both" weightx="1" weighty="1" rows="3" columns="8">
<JScrollPane>
-
+ <FinancialTransactionTableModel id="financialTransactionTableModel"/>
<FinancialTransactionTable
id="financialTransactionTable" sortable="false" rowHeight="22"
constructorParams='handler'
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -25,27 +25,40 @@
package org.chorem.lima.ui.financialtransaction;
-import jaxx.runtime.SwingUtil;
+import static org.nuiton.i18n.I18n._;
+
+import java.awt.event.ItemEvent;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+import javax.swing.JComboBox;
+import javax.swing.JOptionPane;
+import javax.swing.ListSelectionModel;
+
+import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.monitorable.EntryBookServiceMonitorable;
+import org.chorem.lima.business.LimaRuntimeException;
+import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.business.api.EntryBookService;
+import org.chorem.lima.business.api.FinancialPeriodService;
+import org.chorem.lima.business.api.FinancialTransactionService;
+import org.chorem.lima.business.api.FiscalPeriodService;
+import org.chorem.lima.business.api.ImportService;
+import org.chorem.lima.business.utils.EntryComparator;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.EntryImpl;
+import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransaction;
+import org.chorem.lima.entity.FinancialTransactionImpl;
+import org.chorem.lima.entity.FiscalPeriod;
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 org.chorem.lima.util.ErrorHelper;
-import javax.swing.JComboBox;
-import javax.swing.JOptionPane;
-import javax.swing.ListSelectionModel;
-import java.util.List;
-
-import static org.nuiton.i18n.I18n._;
-
/**
* Handler associated with financial transaction view.
*
@@ -55,158 +68,336 @@
* Last update : $Date$
* By : $Author$
*/
-public class FinancialTransactionViewHandler {
+public class FinancialTransactionViewHandler implements ServiceListener {
/** log. */
- private static final Log log =
- LogFactory.getLog(FinancialTransactionViewHandler.class);
+ private static final Log log = LogFactory.getLog(FinancialTransactionViewHandler.class);
+ /** Managed view. */
protected FinancialTransactionView view;
+ /** Cache object used to copy & paste. */
protected Object clipBoard;
- protected FinancialTransactionViewHandler(FinancialTransactionView view) {
+ protected EntryBookService entryBookService;
+ protected FinancialPeriodService financialPeriodService;
+ protected FiscalPeriodService fiscalPeriodService;
+ protected FinancialTransactionService financialTransactionService;
+
+ public FinancialTransactionViewHandler(FinancialTransactionView view) {
this.view = view;
+
+ entryBookService = LimaServiceFactory.getService(EntryBookService.class);
+ financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class);
+ fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class);
+ financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class);
+ LimaServiceFactory.addServiceListener(FinancialPeriodService.class, this);
+ LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this);
+ LimaServiceFactory.addServiceListener(ImportService.class, this);
}
- public FinancialTransactionTable getTable() {
- return view.getFinancialTransactionTable();
+ /**
+ * Init all combo box in view.
+ */
+ public void init() {
+ try {
+ // fiscal periods
+ List<FiscalPeriod> fiscalPeriods = fiscalPeriodService.getAllUnblockedFiscalPeriods();
+ view.getFiscalPeriodComboBoxModel().setObjects(fiscalPeriods);
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Loaded %d fiscal periods", fiscalPeriods.size()));
+ }
+ if (!fiscalPeriods.isEmpty()) {
+ view.getFiscalPeriodComboBoxModel().setSelectedItem(fiscalPeriods.get(0));
+ }
+
+ // entry books
+ List<EntryBook> allEntryBooks = entryBookService.getAllEntryBooks();
+ view.getEntryBookComboBoxModel().setObjects(allEntryBooks);
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Loaded %d entry books", allEntryBooks.size()));
+ }
+ } catch (LimaException ex) {
+ throw new LimaRuntimeException("Can't init financial transaction view", ex);
+ }
}
- public FinancialTransactionTableModel getTableModel() {
- return view.getFinancialTransactionTableModel();
+ /**
+ * New fiscal period selection.
+ *
+ * @param event event
+ */
+ public void fiscalPeriodSelected(ItemEvent event) {
+ if ( event.getStateChange() == ItemEvent.SELECTED ) {
+ FiscalPeriod selectedFiscalPeriod = (FiscalPeriod) event.getItem();
+
+ try {
+ List<FinancialPeriod> financialPeriods = financialPeriodService.getFinancialPeriods(selectedFiscalPeriod.getBeginDate(),
+ selectedFiscalPeriod.getEndDate());
+
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Loaded %d financial periods", financialPeriods.size()));
+ }
+ view.getFinancialPeriodComboBoxModel().setObjects(financialPeriods);
+
+ // update transactions
+ updateFinancialTransactions();
+ } catch (LimaException ex) {
+ throw new LimaRuntimeException("Can't update financial period list", ex);
+ }
+ }
}
- public FiscalPeriodComboBoxModel getFiscalPeriodComboBoxModel() {
- return view.getFiscalPeriodComboBoxModel();
+ /**
+ * New financial period selection.
+ *
+ * @param event event
+ */
+ public void financialPeriodSelected(ItemEvent event) {
+ if ( event.getStateChange() == ItemEvent.SELECTED ) {
+ updateFinancialTransactions();
+ }
}
- public FinancialPeriodComboBoxModel getFinancialPeriodComboBoxModel() {
- return view.getFinancialPeriodComboBoxModel();
+ /**
+ * New entry book selected.
+ *
+ * @param event event
+ */
+ public void entryBookSelected(ItemEvent event) {
+ if ( event.getStateChange() == ItemEvent.SELECTED ) {
+ updateFinancialTransactions();
+ }
}
- public void initEntryBookModel(JComboBox comboBox) {
- EntryBookServiceMonitorable service =
- LimaServiceFactory.getService(EntryBookServiceMonitorable.class);
+ /**
+ * Fill transaction for selection fiscal period, financial perdiod
+ * and entry book.
+ */
+ public void updateFinancialTransactions() {
+ FinancialPeriod financialPeriod = (FinancialPeriod)view.getFinancialPeriodComboBox().getSelectedItem();
+ EntryBook entryBook = (EntryBook)view.getEntryBookComboBox().getSelectedItem();
+
+ // la selection de la financialPeriod est obligatoire
+ // sinon, tout un exercice, c'est trop lourd
+ // l'entry book par contre, est facultatif
+ if (financialPeriod == null) {
+ return;
+ }
+
try {
- List<EntryBook> allEntryBooks = service.getAllEntryBooks();
- allEntryBooks.add(0, null);
- SwingUtil.fillComboBox(comboBox, allEntryBooks, null);
- } catch (LimaException e) {
- ErrorHelper.showErrorDialog(view, e.getMessage(), e.getCause());
+ List<Object> transAndEntries = new ArrayList<Object>();
+ List<FinancialTransaction> transactions;
+ if (entryBook == null) {
+ transactions = financialTransactionService.getAllFinancialTransactions(financialPeriod);
+ } else {
+ transactions = financialTransactionService.getAllFinancialTransactions(financialPeriod, entryBook);
+ }
+
+ // move it to unique collection for table rendering
+ for (FinancialTransaction transaction : transactions) {
+ transAndEntries.add(transaction);
+ List<Entry> entries = (List<Entry>) transaction.getEntry();
+ Collections.sort(entries, new EntryComparator());
+ transAndEntries.addAll(entries);
+ }
+
+ view.getFinancialTransactionTableModel().setTransactionAndEntries(transAndEntries);
+ } catch (LimaException ex) {
+ throw new LimaRuntimeException("Can't get transactions list", ex);
}
}
- //copy entry
+ /**
+ * Copy selected transaction or entry.
+ *
+ * @param indexSelectedRow
+ */
public void copyRow(int indexSelectedRow) {
- if (indexSelectedRow != -1) {
- clipBoard = getTableModel().getElementAt(indexSelectedRow);
- }
+ clipBoard = view.getFinancialTransactionTableModel().getElementAt(indexSelectedRow);
}
- //paste entry
+ /**
+ * Paste entry.
+ *
+ * @param indexSelectedRow selected row to paste entry
+ */
public void pasteRow(int indexSelectedRow) {
- FinancialTransactionTable table = getTable();
- FinancialTransactionTableModel tableModel = getTableModel();
+ FinancialTransactionTable table = view.getFinancialTransactionTable();
- if (indexSelectedRow != -1) {
- if (clipBoard instanceof Entry) {
- try {
- int index = tableModel.addEntry((Entry) clipBoard,
- indexSelectedRow);
+ if (clipBoard instanceof Entry) {
+ try {
+ int index = addEntry((Entry) clipBoard, indexSelectedRow);
- //select the new line
- ListSelectionModel selectionModel =
- table.getSelectionModel();
- selectionModel.setSelectionInterval(
- indexSelectedRow + 1, indexSelectedRow + 1);
- //focus on second column
- table.changeSelection(index, 1, false, false);
- table.requestFocusInWindow();
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't past entry", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
- }
+ //select the new line
+ ListSelectionModel selectionModel = table.getSelectionModel();
+ selectionModel.setSelectionInterval(indexSelectedRow + 1, indexSelectedRow + 1);
+ //focus on second column
+ table.changeSelection(index, 1, false, false);
+ table.requestFocusInWindow();
+ } catch (LimaException eee) {
+ throw new LimaRuntimeException("Can't past entry", eee);
}
}
}
- //add a new transaction
+ /**
+ * @param entry
+ * @param row
+ * @return int: indexOf new Entry
+ * @throws LimaException
+ */
+ protected int addEntry(Entry entry, int row) throws LimaException {
+ FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
+ FinancialTransaction currentTransaction = null;
+ int financialTransactionRow = 0;
+ Object currentRow = tableModel.getElementAt(row);
+ //check if current row is a transaction or an entry
+ if (currentRow instanceof FinancialTransaction) {
+ currentTransaction = (FinancialTransaction) currentRow;
+ //update the financial transaction in entire
+ financialTransactionRow = tableModel.indexOf(currentRow);
+ } else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry) currentRow;
+ //get back the parent transaction of the entry
+ currentTransaction = currentEntry.getFinancialTransaction();
+ //update the financial transaction in entire
+ financialTransactionRow = tableModel.indexOf(((Entry) currentRow).
+ getFinancialTransaction());
+ }
+ //create it
+ entry.setFinancialTransaction(currentTransaction);
+ Entry newEntry = financialTransactionService.createEntry(entry);
+ currentTransaction.addEntry(entry);
+ //FIXME echatellier 20120413 what is fired here ?
+ //fireTableRowsUpdated(financialTransactionRow, financialTransactionRow + currentTransaction.getEntry().size() - 1);
+
+ // on met a jour l'ui
+ int newRow = financialTransactionRow + currentTransaction.getEntry().size() + 1;
+ tableModel.addRow(newEntry, newRow);
+ return newRow;
+ }
+
+ /**
+ * Add new transaction.
+ */
public void addFinancialTransaction() {
- FinancialTransactionTable table = getTable();
- FinancialTransactionTableModel tableModel = getTableModel();
+ FinancialTransactionTable table = view.getFinancialTransactionTable();
ListSelectionModel selectionModel = table.getSelectionModel();
try {
- int index = tableModel.addFinancialTransaction();
+ addFinancialTransaction2();
//select the new line
int numberRow = table.getRowCount();
selectionModel.setSelectionInterval(numberRow - 1, numberRow - 1);
//focus on first column
- table.changeSelection(index, 0, false, false);
-// table.requestFocusInWindow();
- table.scrollCellToVisible(index, 0);
+ table.changeSelection(numberRow, 0, false, false);
+ table.scrollCellToVisible(numberRow, 0);
} catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't add financialtransaction", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
+ throw new LimaRuntimeException("Can't add financialtransaction", eee);
}
}
+
+ /**
+ * Add new transaction after calling service.
+ *
+ * @throws LimaException
+ */
+ public void addFinancialTransaction2() throws LimaException {
- //implement new transaction button
- //add a new entry to the selected transaction
- public void addEntry() {
+ FinancialPeriod financialPeriod = (FinancialPeriod)view.getFinancialPeriodComboBox().getSelectedItem();
+ EntryBook entryBook = (EntryBook)view.getEntryBookComboBox().getSelectedItem();
+ FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
- FinancialTransactionTable table = getTable();
- FinancialTransactionTableModel tableModel = getTableModel();
- ListSelectionModel selectionModel = table.getSelectionModel();
+ FinancialTransaction financialTransaction = new FinancialTransactionImpl();
+ financialTransaction.setFinancialPeriod(financialPeriod);
+ // can be defined later by user
+ if (entryBook != null) {
+ financialTransaction.setEntryBook(entryBook);
+ }
- int indexSelectedRow = table.getSelectedRow();
- if (indexSelectedRow != -1) {
+ // compute new transaction date from selected financial
+ // transaction begin date
+ Calendar actualCalendar = Calendar.getInstance();
+ Date transactionDate = financialPeriod.getBeginDate();
+ Calendar calEnd = Calendar.getInstance();
+ calEnd.setTime(financialPeriod.getEndDate());
+ int dayMax = calEnd.get(Calendar.DAY_OF_MONTH);
+ Calendar calBegin = Calendar.getInstance();
+ calBegin.setTime(financialPeriod.getBeginDate());
+ int dayMin = calBegin.get(Calendar.DAY_OF_MONTH);
+ int toDay = actualCalendar.get(Calendar.DAY_OF_MONTH);
- int firstentryBookrow =
- tableModel.getFirstEntry(indexSelectedRow);
+ // FIXME echatellier 20120413 explain this code, why actualCalendar
+ // is not enought ?
+ if (toDay > dayMax || toDay < dayMin) {
+ transactionDate = DateUtils.setDays(transactionDate, dayMax);
+ } else {
+ transactionDate = DateUtils.setDays(transactionDate, toDay);
+ }
- String voucher;
- String description;
- if (firstentryBookrow == -1) {
+ // set date to the financial transaction
+ financialTransaction.setTransactionDate(transactionDate);
+ // create it
+ FinancialTransaction fTransaction = financialTransactionService.createFinancialTransaction(financialTransaction);
- // no entry book for this transaction
- voucher = null;
- description = null;
+ //on recharge la liste
+ tableModel.addRow(fTransaction);
+ }
- } else {
+ /**
+ * Add new entry to selected transaction.
+ */
+ public void addEntry() {
+ FinancialTransactionTable table = view.getFinancialTransactionTable();
+ FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
+
+ // FIXME echatellier 20120413 what is excatlty selected row here ?
+ // real selected row or selected transaction row ?
+ int indexSelectedRow = table.getSelectedRow();
+ if (indexSelectedRow != -1) {
+ int firstentryBookrow = tableModel.getFirstEntry(indexSelectedRow);
+
+ String defaultVoucher = null;
+ String dafaultDescription = null;
+ if (firstentryBookrow != -1) {
// there is no first entry, grab the voucher and
- voucher = (String)
- tableModel.getValueAt(indexSelectedRow, 2);
- description = (String)
- tableModel.getValueAt(indexSelectedRow, 4);
+ defaultVoucher = (String) tableModel.getValueAt(firstentryBookrow, 2);
+ dafaultDescription = (String) tableModel.getValueAt(firstentryBookrow, 4);
}
+
try {
-
// creates the new entry
+ Entry entry = new EntryImpl();
+ entry.setVoucher(defaultVoucher);
+ entry.setDescription(dafaultDescription);
+ // check if current row is a transaction or an entry
+ FinancialTransaction currentTransaction = null;
+ Object currentRow = tableModel.getElementAt(indexSelectedRow);
+ if (currentRow instanceof FinancialTransaction) {
+ currentTransaction = (FinancialTransaction) currentRow;
+ } else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry) currentRow;
+ //get back the parent transaction of the entry
+ currentTransaction = currentEntry.getFinancialTransaction();
+ }
+ // create it in service
+ entry.setFinancialTransaction(currentTransaction);
+ Entry newEntry = financialTransactionService.createEntry(entry);
+ currentTransaction.addEntry(newEntry);
- int index = tableModel.addEmptyEntry(
- voucher,
- description,
- indexSelectedRow
- );
+ // add it in ui
+ tableModel.addRow(newEntry, indexSelectedRow + currentTransaction.getEntry().size());
//select the new line
+ ListSelectionModel selectionModel = table.getSelectionModel();
selectionModel.setSelectionInterval(
indexSelectedRow + 1, indexSelectedRow + 1);
- //focus on second column
- table.changeSelection(index, 1, false, false);
-// table.requestFocusInWindow();
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't add emptyentry", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
+ table.changeSelection(indexSelectedRow + 1, 1, false, false);
+
+ } catch (LimaException ex) {
+ throw new LimaRuntimeException("Can't add emptyentry", ex);
}
} else {
if (log.isWarnEnabled()) {
@@ -218,42 +409,47 @@
/**
* Delete selected row in table (could be transaction or entry).
* <p/>
- * Called by model.
+ * Called by table.
*/
public void deleteSelectedRow() {
- FinancialTransactionTable table = getTable();
- FinancialTransactionTableModel tableModel = getTableModel();
+ FinancialTransactionTable table = view.getFinancialTransactionTable();
+ FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
int indexSelectedRow = table.getSelectedRow();
if (indexSelectedRow != -1) {
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
- String message;
+
+ int response;
if (selectedValue instanceof FinancialTransaction) {
- message = _("lima.charts.financialtransaction.question.removetransaction");
+ response = JOptionPane.showConfirmDialog(
+ view, _("lima.ui.financialtransaction.messageremovetransaction"),
+ _("lima.ui.financialtransaction.titleremovetransaction"), JOptionPane.YES_NO_OPTION);
} else {
- message = _("lima.charts.financialtransaction.question.removeentry");
+ response = JOptionPane.showConfirmDialog(
+ view, _("lima.ui.financialtransaction.messageremoveentry"),
+ _("lima.ui.financialtransaction.titleremoveentry"), JOptionPane.YES_NO_OPTION);
}
- int response = JOptionPane.showConfirmDialog(
- view, message,
- _("lima.common.confirmation"), JOptionPane.YES_NO_OPTION);
-
if (response == JOptionPane.YES_OPTION) {
+ try {
+ if (selectedValue instanceof FinancialTransaction) {
+ FinancialTransaction currentTransaction =
+ (FinancialTransaction) selectedValue;
+ financialTransactionService.removeFinancialTransaction(currentTransaction);
+
+ } else if (selectedValue instanceof Entry) {
+ Entry currentEntry = (Entry) selectedValue;
+ financialTransactionService.removeEntry(currentEntry);
+ }
+ tableModel.deleteRow(indexSelectedRow);
- try {
- tableModel.removeObject(indexSelectedRow);
//select the upper line
- ListSelectionModel selectionModel =
- table.getSelectionModel();
- selectionModel.setSelectionInterval(
- indexSelectedRow - 1, indexSelectedRow - 1);
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't remove transaction or entry", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
+ ListSelectionModel selectionModel = table.getSelectionModel();
+ selectionModel.setSelectionInterval(indexSelectedRow - 1, indexSelectedRow - 1);
+ } catch (LimaException ex) {
+ throw new LimaRuntimeException("Can't remove transaction or entry", ex);
}
}
} else {
@@ -263,36 +459,47 @@
}
}
+ /**
+ * Select previous value in combo box.
+ *
+ * @param comboBox combo box
+ */
public void back(JComboBox comboBox) {
int row = comboBox.getSelectedIndex();
- if (log.isDebugEnabled()) {
- log.debug(row);
- }
if (row > 0) {
comboBox.setSelectedIndex(row - 1);
- //FIXME tchemit-2011-09-20 Should never referesh ui by hand
- comboBox.repaint();
}
}
+ /**
+ * Select next value in combo box.
+ *
+ * @param comboBox combo box
+ */
public void next(JComboBox comboBox) {
int size = comboBox.getModel().getSize();
int row = comboBox.getSelectedIndex();
- if (log.isDebugEnabled()) {
- log.debug(row);
- }
if (row < size - 1) {
comboBox.setSelectedIndex(row + 1);
- //FIXME tchemit-2011-09-20 Should never referesh ui by hand
- comboBox.repaint();
}
}
- public void refresh() {
- getTableModel().refresh();
- getFiscalPeriodComboBoxModel().refresh();
- getFinancialPeriodComboBoxModel().refresh();
+ /*
+ * @see org.chorem.lima.business.ServiceListener#notifyMethod(java.lang.String, java.lang.String)
+ */
+ @Override
+ public void notifyMethod(String serviceName, String methodName) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Method notified " + serviceName + "#" + methodName);
+ }
+
+ if (serviceName.contains("FinancialTransaction") ||
+ methodName.contains("importEntries") ||
+ methodName.contains("importAll")) {
+ updateFinancialTransactions();
+ }
}
}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/package-info.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/package-info.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -0,0 +1,31 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+/**
+ * Saisie des écritures.
+ *
+ * Selection de l'exercice, de la periode et du journal et affichage
+ * de la liste correspondante.
+ */
+package org.chorem.lima.ui.financialtransaction;
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedView.jaxx 2012-04-13 13:46:24 UTC (rev 3366)
@@ -33,7 +33,7 @@
<FinancialTransactionUnbalancedViewHandler id="handler"
javaBean="new FinancialTransactionUnbalancedViewHandler(this)"/>
<Boolean id="selectedRow" javaBean="false"/>
- <FiscalPeriodComboBoxModel id="modelFiscalPeriod"/>
+ <org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel id="modelFiscalPeriod"/>
<script>
<![CDATA[
void $afterCompleteSetup() {
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/EntryBookListRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/EntryBookListRenderer.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/EntryBookListRenderer.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -1,61 +0,0 @@
-/*
- * #%L
- *
- *
- * $Id$
- * $HeadURL$
- * %%
- * 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 Lesser 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 Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.chorem.lima.ui.fiscalperiod;
-
-import java.awt.Component;
-
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JList;
-
-import org.chorem.lima.entity.EntryBook;
-
-/**
- * EntryBook renderer for fiscal period retaining earning list.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class EntryBookListRenderer extends DefaultListCellRenderer {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = -9089182547408397051L;
-
- @Override
- public Component getListCellRendererComponent(JList list, Object value,
- int index, boolean isSelected, boolean cellHasFocus) {
-
- EntryBook entryBook = (EntryBook)value;
- Object newValue = entryBook;
- if (entryBook != null) {
- newValue = entryBook.getCode() + " - " + entryBook.getLabel();
- }
- return super.getListCellRendererComponent(list, newValue, index, isSelected,
- cellHasFocus);
- }
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTable.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -59,16 +59,11 @@
private static final long serialVersionUID = -8462838870024505659L;
- protected FiscalPeriodViewHandler handler;
-
protected FiscalPeriodTableModel model;
- private Highlighter colorTransaction;
-
public FiscalPeriodTable(FiscalPeriodTableModel model) {
super(model);
this.model = model;
- this.handler = handler;
addKeyListener(this);
addMouseListener(this);
@@ -90,7 +85,7 @@
return fiscalPeriod.getLocked();
}
};
- colorTransaction =
+ Highlighter colorTransaction =
new ColorHighlighter(predicate, null, new Color(222, 0, 0));
addHighlighter(colorTransaction);
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -43,8 +43,6 @@
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.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.EntryBookImpl;
@@ -60,15 +58,15 @@
*
* @author chatellier
* @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
+ *
+ * Last update : $Date$
+ * By : $Author$
*/
public class FiscalPeriodViewHandler implements ServiceListener {
private static final Log log = LogFactory.getLog(FiscalPeriodViewHandler.class);
- private FiscalPeriodView view;
+ protected FiscalPeriodView view;
/** Service. */
protected FiscalPeriodService fiscalPeriodService;
@@ -83,10 +81,10 @@
public FiscalPeriodViewHandler(FiscalPeriodView view) {
this.view = view;
- fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodServiceMonitorable.class);
- financialTransactionService = LimaServiceFactory.getService(FinancialTransactionServiceMonitorable.class);
+ fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class);
+ financialTransactionService = LimaServiceFactory.getService(FinancialTransactionService.class);
- LimaServiceFactory.addServiceListener(FiscalPeriodServiceMonitorable.class, this);
+ LimaServiceFactory.addServiceListener(FiscalPeriodService.class, this);
}
public void init() {
@@ -236,7 +234,7 @@
try {
boolean found = false;
List<FinancialTransaction> financialTransactionsList =
- financialTransactionService.getAllFinancialTransactionsFromDateToDate(
+ financialTransactionService.getAllFinancialTransactions(
selectedFiscalPeriod.getBeginDate(), selectedFiscalPeriod.getEndDate());
//check if they are at least one transaction to be report
if (!financialTransactionsList.isEmpty()) {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/RetainedEarningsEntryBookForm.jaxx 2012-04-13 13:46:24 UTC (rev 3366)
@@ -29,7 +29,7 @@
<import>
javax.swing.text.Document
org.chorem.lima.entity.EntryBook
- org.chorem.lima.ui.combobox.EntryBookComboBoxModel
+ org.chorem.lima.ui.common.EntryBookListRenderer
</import>
<EntryBook id="entryBook" javaBean="null"/>
@@ -92,7 +92,7 @@
<JLabel id="entryBookSelectorLabel" text="lima.common.entrybook"/>
</cell>
<cell>
- <EntryBookComboBoxModel id="modelEntryBookComboBox"/>
+ <org.chorem.lima.ui.combobox.EntryBookComboBoxModel id="modelEntryBookComboBox"/>
<JComboBox id="entryBookComboBox"
model="{getModelEntryBookComboBox()}"
renderer="{new EntryBookListRenderer()}"
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-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-04-13 13:46:24 UTC (rev 3366)
@@ -123,7 +123,7 @@
if (selectedBeginDate != null && selectedEndDate != null) {
try {
List<FinancialTransaction> financialtransactions =
- financialTransactionService.getAllFinancialTransactionsFromDateToDate(
+ financialTransactionService.getAllFinancialTransactions(
selectedBeginDate, selectedEndDate);
for (FinancialTransaction financialtransaction : financialtransactions) {
results.add(financialtransaction);
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-04-13 13:46:24 UTC (rev 3366)
@@ -293,6 +293,23 @@
lima.ui.entrybook.label=
lima.ui.entrybook.remove=
lima.ui.entrybook.update=
+lima.ui.financialtransaction.account=
+lima.ui.financialtransaction.balance=
+lima.ui.financialtransaction.buttonback=
+lima.ui.financialtransaction.buttonnext=
+lima.ui.financialtransaction.credit=
+lima.ui.financialtransaction.date=
+lima.ui.financialtransaction.debit=
+lima.ui.financialtransaction.description=
+lima.ui.financialtransaction.entrybook=
+lima.ui.financialtransaction.financialperiod=
+lima.ui.financialtransaction.fiscalyear=
+lima.ui.financialtransaction.letter=
+lima.ui.financialtransaction.messageremoveentry=
+lima.ui.financialtransaction.messageremovetransaction=
+lima.ui.financialtransaction.titleremoveentry=
+lima.ui.financialtransaction.titleremovetransaction=
+lima.ui.financialtransaction.voucher=
lima.ui.fiscalperiod.addfiscalperiod.morethan12=
lima.ui.fiscalperiod.addfiscalperiodtitle=
lima.ui.fiscalperiod.addperiodtitle=
Modified: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-04-13 13:46:24 UTC (rev 3366)
@@ -272,6 +272,23 @@
lima.ui.entrybook.label=Libellé
lima.ui.entrybook.remove=Supprimer
lima.ui.entrybook.update=Modifier
+lima.ui.financialtransaction.account=Compte
+lima.ui.financialtransaction.balance=Balance
+lima.ui.financialtransaction.buttonback=←
+lima.ui.financialtransaction.buttonnext=→
+lima.ui.financialtransaction.credit=Crédit
+lima.ui.financialtransaction.date=Date
+lima.ui.financialtransaction.debit=Débit
+lima.ui.financialtransaction.description=Description
+lima.ui.financialtransaction.entrybook=Journal
+lima.ui.financialtransaction.financialperiod=Périodes comptables
+lima.ui.financialtransaction.fiscalyear=Exercices
+lima.ui.financialtransaction.letter=Lettre
+lima.ui.financialtransaction.messageremoveentry=Voulez-vous supprimer cette ligne de transaction?
+lima.ui.financialtransaction.messageremovetransaction=Voulez-vous supprimer cette transaction?
+lima.ui.financialtransaction.titleremoveentry=Suppression
+lima.ui.financialtransaction.titleremovetransaction=Suppression
+lima.ui.financialtransaction.voucher=Pièce comptable
lima.ui.fiscalperiod.addfiscalperiod.morethan12=La période sélectionnée n'est pas de 12 mois, voulez-vous continuer ?
lima.ui.fiscalperiod.addfiscalperiodtitle=Nouvel exercice
lima.ui.fiscalperiod.addperiodtitle=
Modified: trunk/lima-swing/src/main/resources/log4j.properties
===================================================================
--- trunk/lima-swing/src/main/resources/log4j.properties 2012-04-12 16:37:45 UTC (rev 3365)
+++ trunk/lima-swing/src/main/resources/log4j.properties 2012-04-13 13:46:24 UTC (rev 3366)
@@ -38,4 +38,5 @@
# package level
log4j.logger.org.chorem.lima=INFO
+log4j.logger.org.chorem.lima.business.ejb=DEBUG
log4j.logger.org.chorem.lima.ui.account=DEBUG
\ No newline at end of file
1
0
Author: echatellier
Date: 2012-04-12 18:37:45 +0200 (Thu, 12 Apr 2012)
New Revision: 3365
Url: http://chorem.org/repositories/revision/lima/3365
Log:
Remove Letter entity and VatStatement#amount from model
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java
Modified:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java
trunk/lima-callao/src/main/xmi/accounting.zargo
trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaDecoratorProvider.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.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/financialtransactionsearch/LetterSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.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/vatchart/VatChartViewHandler.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -545,7 +545,7 @@
nextLine[2] = entry.getDescription();
nextLine[3] = entry.getAmount().toString();
nextLine[4] = Boolean.toString(entry.getDebit());
- nextLine[5] = entry.getLetter().getCode();
+ nextLine[5] = entry.getLettering();
nextLine[6] = entry.getDetail();
nextLine[7] = entry.getVoucher();
nextLine[8] = entry.getPosition();
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -25,6 +25,16 @@
package org.chorem.lima.business.ejb;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.AccountingRules;
@@ -46,24 +56,12 @@
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FinancialTransactionDAO;
import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.Letter;
-import org.chorem.lima.entity.LetterDAO;
-import org.chorem.lima.entity.LetterImpl;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
import org.nuiton.topia.framework.TopiaQuery.Op;
-import javax.ejb.EJB;
-import javax.ejb.Local;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
/**
* Cette classe permet la création d'une transaction comptable dans l'application.
* Toute action sur une transaction entraîne automatiquement une création de log.
@@ -168,8 +166,7 @@
.addLoad(financialPeriodProperty)
.addLoad(entryBookLabelProperty)
.addLeftJoin("T." + FinancialTransaction.PROPERTY_ENTRY, "E", true)
- .addFetch("E." + Entry.PROPERTY_ACCOUNT)
- .addFetch("E." + Entry.PROPERTY_LETTER);
+ .addFetch("E." + Entry.PROPERTY_ACCOUNT);
financialTransactions = transactionDAO.findAllByQuery(query);
} catch (Exception ex) {
doCatch(topiaTransaction, ex);
@@ -209,8 +206,7 @@
.addLoad(financialPeriodProperty)
.addLoad(entryBookLabelProperty)
.addLeftJoin("T." + FinancialTransaction.PROPERTY_ENTRY, "E", true)
- .addFetch("E." + Entry.PROPERTY_ACCOUNT)
- .addFetch("E." + Entry.PROPERTY_LETTER);
+ .addFetch("E." + Entry.PROPERTY_ACCOUNT);
financialTransactions = transactionDAO.findAllByQuery(query);
} catch (Exception ex) {
doCatch(topiaTransaction, ex);
@@ -258,7 +254,6 @@
.addEquals("F", fiscalPeriod)
// load lazy
.addFetch("E." + Entry.PROPERTY_ACCOUNT)
- .addFetch("E." + Entry.PROPERTY_LETTER)
.addLoad(financialPeriodProperty)
.addLoad(entryBookLabelProperty);
@@ -505,7 +500,7 @@
entryOld.setVoucher(entry.getVoucher());
entryOld.setFinancialTransaction(entry.getFinancialTransaction());
entryOld.setPosition(entry.getPosition());
- entryOld.setLetter(entry.getLetter());
+ entryOld.setLettering(entry.getLettering());
//update entry
entryDAO.update(entryOld);
@@ -542,139 +537,7 @@
}
}
- /**
- * Get letter from count of existing letter
- * 1 -> A, 2 -> B, 26 -> Z, 27 -> AA, 28 -> AB, ...
- */
@Override
- public Letter getNewLetter() throws LimaException {
- Letter letter = new LetterImpl();
- TopiaContext topiaContext = beginTransaction(rootContext);
- try {
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
- long n = letterDAO.count();
- String res = numberToString(n, null);
-
- //if already exist
- while (letterDAO.findByCode(res) != null) {
- res = numberToString(n++, null);
- }
- letter.setCode(res);
- } catch (Exception ex) {
- doCatch(topiaContext, ex);
- } finally {
- doFinally(topiaContext);
- }
- return letter;
- }
-
- public String numberToString(long n, StringBuffer result) {
- if (result == null) {
- result = new StringBuffer();
- }
- long mod = (n - 1) % 26;
- long div = (n - 1) / 26;
- if (div > 0) {
- result.append(numberToString(div, result));
- }
- return result.append((char) (mod + 65)).toString();
- }
-
- @Override
- public void createLetter(Letter letter) throws LimaException {
- TopiaContext topiaContext = beginTransaction(rootContext);
- try {
- createLetterWithTransaction(letter, topiaContext);
- } catch (Exception ex) {
- doCatch(topiaContext, ex);
- } finally {
- doFinally(topiaContext);
- }
- }
-
- public void createLetterWithTransaction(Letter letter,
- TopiaContext topiaContext) throws LimaException {
- try {
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
- letterDAO.create(letter);
- commitTransaction(topiaContext);
- } catch (TopiaException ex) {
- doCatch(topiaContext, ex);
- }
- }
-
- @Override
- public void removeLetter(Letter letter) throws LimaException {
- TopiaContext topiaContext = beginTransaction(rootContext);
- try {
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
- letterDAO.delete(letter);
- commitTransaction(topiaContext);
- } catch (Exception ex) {
- doCatch(topiaContext, ex);
- } finally {
- doFinally(topiaContext);
- }
- }
-
-
- @Override
- public List<Letter> getAllLetters() throws LimaException {
- List<Letter> letters = null;
- TopiaContext topiaContext = beginTransaction(rootContext);
- try {
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
- letters = letterDAO.findAll();
- } catch (Exception ex) {
- doCatch(topiaContext, ex);
- } finally {
- doFinally(topiaContext);
- }
- return letters;
- }
-
-
- @Override
- public void setEntryLetter(Entry entry,
- Letter letter) throws LimaException {
-
- TopiaContext topiaContext = beginTransaction(rootContext);
- try {
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
- Letter letterOld = letterDAO.findByCode(letter.getCode());
- if (letterOld == null) {
- createLetterWithTransaction(letter, topiaContext);
- letterOld = letter;
- }
- EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
- Entry entryOld = entryDAO.findByTopiaId(entry.getTopiaId());
- entryOld.setLetter(letterOld);
- commitTransaction(topiaContext);
- } catch (Exception ex) {
- doCatch(topiaContext, ex);
- } finally {
- doFinally(topiaContext);
- }
- }
-
- @Override
- public void removeEntryLetter(Entry entry) throws LimaException {
-
- TopiaContext topiaContext = beginTransaction(rootContext);
- try {
-
- EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaContext);
- Entry entryOld = entryDAO.findByTopiaId(entry.getTopiaId());
- entryOld.setLetter(null);
- commitTransaction(topiaContext);
- } catch (Exception ex) {
- doCatch(topiaContext, ex);
- } finally {
- doFinally(topiaContext);
- }
- }
-
- @Override
public List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException {
List<Object> result = new ArrayList<Object>();
List<FinancialTransaction> financialTransactions;
@@ -708,9 +571,9 @@
if (description != null) {
query.addWhere("E.description", Op.LIKE, "%" + description + "%");
}
- Letter letter = financialTransactionSearch.getLetter();
+ String letter = financialTransactionSearch.getLettering();
if (letter != null) {
- query.addEquals("E.letter", letter);
+ query.addEquals("E.lettering", letter);
}
Account account = financialTransactionSearch.getAccount();
String accountsList = financialTransactionSearch.getAccountList();
@@ -766,8 +629,6 @@
TopiaQuery query2 = entryDAO.createQuery();
query2.addEquals(Entry.PROPERTY_FINANCIAL_TRANSACTION, financialTransaction);
- //Load for lazy
- query2.addLoad(Entry.PROPERTY_ACCOUNT, Entry.PROPERTY_LETTER);
List<Entry> entries = entryDAO.findAllByQuery(query2);
result.addAll(entries);
}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -93,9 +93,6 @@
import org.chorem.lima.entity.FiscalPeriodImpl;
import org.chorem.lima.entity.Identity;
import org.chorem.lima.entity.IdentityImpl;
-import org.chorem.lima.entity.Letter;
-import org.chorem.lima.entity.LetterDAO;
-import org.chorem.lima.entity.LetterImpl;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
import org.chorem.lima.entity.VatStatement;
import org.chorem.lima.entity.VatStatementDAO;
@@ -263,9 +260,7 @@
entry.setDescription(entryEBP.getLibelle());
entry.setVoucher(entryEBP.getPiece());
- Letter letter = createLetter(
- entryEBP.getLettre(), topiaContext);
- entry.setLetter(letter);
+ entry.setLettering(entryEBP.getLettre());
String entryBookCode = entryEBP.getJournal();
EntryBook entryBook = entryBookDAO
@@ -767,41 +762,7 @@
return result.toString();
}
-
/**
- * Import and create Letter : TYPE | Code
- *
- * @param nextLine
- * @param topiaContext
- * @return
- * @throws LimaException
- */
- protected String importLetterCSV(String[] nextLine,
- TopiaContext topiaContext) throws LimaException {
- StringBuilder result = new StringBuilder();
- try {
-
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
-
- Letter letter = new LetterImpl();
- String code = nextLine[1];
- letter.setCode(code);
-
- // if exist, skip
- if (letterDAO.findByCode(code) != null) {
- result.append(_("lima-business.import.letteralreadyexist", code));
- } else {
- // create it
- financialTransactionService.createLetter(letter);
- result.append(_("lima-business.import.letteradded", code));
- }
- } catch (TopiaException eeeTE) {
- doCatch(topiaContext, eeeTE);
- }
- return result.toString();
- }
-
- /**
* Import and create closedperiodicentrybook import Structure : TYPE |
* BeginDate | EndDate | Locked
*
@@ -1135,7 +1096,7 @@
vatStatement.setHeader(Boolean
.parseBoolean(vatStatementImport
.getHeader()));
- vatStatement.setAmount(BigDecimal.ZERO);
+
vatStatementService
.createVatStatementWithTransaction(
masterVatStatement,
@@ -1182,33 +1143,6 @@
return result.toString();
}
-
- /**
- * Dynamic letter creation used by CSV and EBP Import
- *
- * @param letterCode
- * @param topiaContext
- * @return
- * @throws LimaException
- */
- protected Letter createLetter(String letterCode,
- TopiaContext topiaContext) throws LimaException {
- Letter letter = null;
- try {
- LetterDAO letterDAO = LimaCallaoDAOHelper.getLetterDAO(topiaContext);
- letter = letterDAO.findByCode(letterCode);
- // if letter not exist create it !
- if (letter == null) {
- letter = new LetterImpl();
- letter.setCode(letterCode);
- financialTransactionService.createLetter(letter);
- }
- } catch (TopiaException eeeTE) {
- doCatch(topiaContext, eeeTE);
- }
- return letter;
- }
-
protected String createAccounts(Map<String, AccountImport> accounts,
TopiaContext topiaContext) throws LimaException {
StringBuilder result = new StringBuilder();
@@ -1355,9 +1289,7 @@
entry.setAmount(new BigDecimal(entryImport.getAmount()));
entry.setDebit(Boolean.parseBoolean(entryImport.getDebit()));
- Letter letter = createLetter(
- entryImport.getLettering(), topiaContext);
- entry.setLetter(letter);
+ entry.setLettering(entryImport.getLettering());
entry.setDetail(entryImport.getDetail());
entry.setVoucher(entryImport.getVoucher());
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -232,8 +232,7 @@
String loadEntryBookProperty =
TopiaQuery.getProperty(Entry.PROPERTY_FINANCIAL_TRANSACTION,
FinancialTransaction.PROPERTY_ENTRY_BOOK);
- entriesQuery.addLoad(Entry.PROPERTY_ACCOUNT, Entry.PROPERTY_FINANCIAL_TRANSACTION, Entry.PROPERTY_LETTER)
- .addLoad(loadEntryBookProperty);
+ entriesQuery.addLoad(loadEntryBookProperty);
reportsDatas.setListEntry(entryDAO.findAllByQuery(entriesQuery));
TopiaQuery amountsQuery =
@@ -377,8 +376,6 @@
EntryDAO entryDAO = LimaCallaoDAOHelper.getEntryDAO(topiaTransaction);
TopiaQuery entriesQuery = createEntryBookReportsQuery(
entryBook, beginDate, endDate, entryDAO, "E");
- //IMPORTANT : LOADING ENTRIES AND IS COLUMN FOR NO LAZY EXCEPTION
- entriesQuery.addLoad(Entry.PROPERTY_ACCOUNT, Entry.PROPERTY_FINANCIAL_TRANSACTION, Entry.PROPERTY_LETTER);
String orderDateProperty =
TopiaQuery.getProperty("E", Entry.PROPERTY_FINANCIAL_TRANSACTION, FinancialTransaction.PROPERTY_TRANSACTION_DATE);
String orderIdProperty =
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -63,11 +63,18 @@
// delete computed fields
queries.add("Alter table FINANCIALTRANSACTION drop column AMOUNTDEBIT");
queries.add("Alter table FINANCIALTRANSACTION drop column AMOUNTCREDIT");
-
+
// modele refactoring
queries.add("drop table record");
+
queries.add("alter table account drop column masteraccount");
queries.add("alter table account drop column generalledger");
+
+ queries.add("alter table entry add column lettering varchar(30)");
+ queries.add("update entry e set lettering = (select l.code from Letter l where l.topiaid = e.letter)");
+ queries.add("alter table entry drop column letter");
+ queries.add("drop table letter");
+
+ queries.add("alter table vatstatement drop column amount");
}
-
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -32,7 +32,6 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.Letter;
import java.util.Date;
import java.util.List;
@@ -75,17 +74,4 @@
void updateEntry(Entry entry) throws LimaException;
void removeEntry(Entry entry) throws LimaException;
-
- Letter getNewLetter() throws LimaException;
-
- void createLetter(Letter letter) throws LimaException;
-
- void removeLetter(Letter letter) throws LimaException;
-
- List<Letter> getAllLetters() throws LimaException;
-
- void setEntryLetter(Entry entry, Letter letter) throws LimaException;
-
- void removeEntryLetter(Entry entry) throws LimaException;
-
}
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaDecoratorProvider.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaDecoratorProvider.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaDecoratorProvider.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -27,7 +27,6 @@
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.Letter;
import org.nuiton.util.decorator.DecoratorProvider;
/**
@@ -43,8 +42,6 @@
registerJXPathDecorator(EntryBook.class, "${code}$s - ${label}$s");
- registerJXPathDecorator(Letter.class, "${code}$s");
-
registerJXPathDecorator(
FiscalPeriod.class,
"${beginDate}$td/%1$tm/%1$tY - ${endDate}$td/%1$tm/%1$tY");
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -30,7 +30,6 @@
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
-import org.chorem.lima.entity.Letter;
import javax.swing.table.AbstractTableModel;
import java.math.BigDecimal;
@@ -96,7 +95,7 @@
result = String.class;
break;
case 5:
- result = Letter.class;
+ result = String.class;
break;
case 6:
result = BigDecimal.class;
@@ -172,11 +171,7 @@
result = currentRow.getDescription();
break;
case 5:
- if (currentRow.getLetter() != null) {
- result = currentRow.getLetter().getCode();
- } else {
- result = null;
- }
+ result = currentRow.getLettering();
break;
case 6:
result = currentRow.getDebit() ? currentRow.getAmount() : BigDecimal.ZERO;
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/LetterTableCellEditor.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -1,153 +0,0 @@
-/*
- * #%L
- * Lima Swing
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.ui.celleditor;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.Account;
-import org.chorem.lima.entity.Letter;
-import org.chorem.lima.ui.LimaRendererUtil;
-import org.chorem.lima.ui.combobox.LetterComboBoxModel;
-import org.chorem.lima.util.LetterToString;
-import org.chorem.lima.widgets.JWideComboBox;
-import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
-
-import javax.swing.AbstractCellEditor;
-import javax.swing.JTable;
-import javax.swing.ListCellRenderer;
-import javax.swing.SwingUtilities;
-import javax.swing.table.TableCellEditor;
-import javax.swing.text.JTextComponent;
-import java.awt.Component;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-import java.awt.event.MouseEvent;
-import java.util.EventObject;
-
-public class LetterTableCellEditor extends AbstractCellEditor implements TableCellEditor, KeyListener {
-
- protected static final Log log = LogFactory.getLog(EntryBookTableCellEditor.class);
-
- private static final long serialVersionUID = 1L;
-
- private final JWideComboBox comboBox;
-// private static LetterTableCellEditor editor;
-
- private static boolean keyPressed;
-
- /** constructor */
- public LetterTableCellEditor() {
- comboBox = new JWideComboBox();
- LetterComboBoxModel comboBoxModel = new LetterComboBoxModel();
- comboBox.setModel(comboBoxModel);
- ListCellRenderer renderer =
- LimaRendererUtil.newDecoratorListCellRenderer(Letter.class);
- comboBox.setRenderer(renderer);
- AutoCompleteDecorator.decorate(comboBox, LetterToString.getInstance());
- comboBox.getEditor().getEditorComponent().addKeyListener(this);
- }
-
- @Override
- public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
- if (value instanceof Account) {
- comboBox.setSelectedItem(value);
- }
- return comboBox;
- }
-
- @Override
- public Object getCellEditorValue() {
- return comboBox.getSelectedItem();
- }
-
- /**
- * Vérifie si la cellule peut être éditable :
- * seulement si il y a une frappe au clavier ou un double clic.
- *
- * @param evt
- * @return
- */
- @Override
- public boolean isCellEditable(EventObject evt) {
- // Si il y a une frappe au clavier
- if (evt instanceof KeyEvent) {
- final KeyEvent keyEvent = (KeyEvent) evt;
- // Empèche la touche echap
- if (keyEvent.getKeyChar() != KeyEvent.VK_ESCAPE) {
- // Permet de placer le focus sur l'editor de la comboBox
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- comboBox.getEditor().getEditorComponent().requestFocus();
- JTextComponent edit = (JTextComponent) comboBox.getEditor().getEditorComponent();
- if (!Character.isIdentifierIgnorable(keyEvent.getKeyChar())) {
- edit.setText(Character.toString(keyEvent.getKeyChar()));
- }
- }
- });
- }
- }
- keyPressed = false;
- return !(evt instanceof MouseEvent) || ((MouseEvent) evt).getClickCount() == 2;
- }
-
-
- @Override
- public void keyPressed(KeyEvent e) {
-
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
-
- // Vérifie si c'est la première frappe au clavier
- if (!keyPressed) {
- // Récupère l'editor de la comboBox
- JTextComponent edit = (JTextComponent) comboBox.getEditor().getEditorComponent();
- // Met en place le curseur et la selection après la première lettre
- edit.select(1, edit.getText().length());
- keyPressed = true;
- }
-
- // delegate popup list menu
- if (e.getKeyChar() == KeyEvent.VK_ENTER) {
- fireEditingStopped();
- }
- }
-
- @Override
- public void keyTyped(KeyEvent e) {
-
- }
-
-// public static LetterTableCellEditor getInstance() {
-// if (editor == null) {
-// editor = new LetterTableCellEditor();
-// }
-// return editor;
-// }
-
-}
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -1,115 +0,0 @@
-/*
- * #%L
- * Lima Swing
- *
- * $Id$
- * $HeadURL$
- * %%
- * 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.LimaException;
-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.entity.Letter;
-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;
-
-/** Account combo box model. */
-
-public class LetterComboBoxModel extends AbstractListModel implements ComboBoxModel, ServiceListener {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log =
- LogFactory.getLog(FinancialPeriodTableModel.class);
-
- protected Object selectedAccount;
-
- protected List<Letter> datasCache;
-
- protected FinancialTransactionService service;
-
- public LetterComboBoxModel() {
- service =
- LimaServiceFactory.getService(
- FinancialTransactionServiceMonitorable.class);
- LimaServiceFactory.addServiceListener(service, this);
- LimaServiceFactory.addServiceListener(ImportServiceMonitorable.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<Letter> getDataList() {
- List<Letter> result = null;
- try {
- result = service.getAllLetters();
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't get list letters", eee);
- }
- }
- 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();
- }
- }
-
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2008 - 2010 CodeLutin
+ * 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
@@ -30,7 +30,6 @@
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
-import org.chorem.lima.entity.Letter;
import javax.swing.table.AbstractTableModel;
import java.math.BigDecimal;
@@ -91,7 +90,7 @@
result = String.class;
break;
case 4:
- result = Letter.class;
+ result = String.class;
break;
case 5:
result = BigDecimal.class;
@@ -160,11 +159,7 @@
result = currentRow.getDescription();
break;
case 4:
- if (currentRow.getLetter() != null) {
- result = currentRow.getLetter().getCode();
- } else {
- result = null;
- }
+ result = currentRow.getLettering();
break;
case 5:
result = currentRow.getDebit() ? currentRow.getAmount() : BigDecimal.ZERO;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -42,7 +42,6 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FinancialTransactionImpl;
-import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.ErrorHelper;
@@ -166,7 +165,7 @@
result = String.class;
break;
case 5:
- result = Letter.class;
+ result = String.class;
break;
case 6:
result = BigDecimal.class;
@@ -299,11 +298,7 @@
result = currentEntry.getDescription();
break;
case 5:
- if (currentEntry.getLetter() != null) {
- result = currentEntry.getLetter().getCode();
- } else {
- result = null;
- }
+ result = currentEntry.getLettering();
break;
case 6:
result = currentEntry.getDebit() ? currentEntry.getAmount() : BigDecimal.ZERO;
@@ -619,7 +614,7 @@
}
break;
case 5:
- currentEntry.setLetter((Letter) value);
+ currentEntry.setLettering((String) value);
break;
case 6:
currentEntry.setAmount((BigDecimal) value);
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-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -44,7 +44,6 @@
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -118,7 +117,7 @@
List<Object> results = null;
//prevent to much result
if (financialTransactionSearch != null && (financialTransactionSearch.getVoucher() != null || financialTransactionSearch.getDescription() != null
- || financialTransactionSearch.getLetter() != null || financialTransactionSearch.getAccountList() != null
+ || financialTransactionSearch.getLettering() != null || financialTransactionSearch.getAccountList() != null
|| financialTransactionSearch.getAccount() != null || financialTransactionSearch.getEntryBook() != null
|| financialTransactionSearch.getAmount() != null && financialTransactionSearch.getOperator() != null
|| financialTransactionSearch.getAmount() != null && financialTransactionSearch.getAmount2() != null)) {
@@ -171,7 +170,7 @@
result = String.class; //Description
break;
case 5:
- result = Letter.class; //Letter
+ result = String.class; //Letter
break;
case 6:
result = BigDecimal.class; //Debit
@@ -308,11 +307,7 @@
result = currentEntry.getDescription(); //Description
break;
case 5:
- if (currentEntry.getLetter() != null) {
- result = currentEntry.getLetter().getCode();
- } else {
- result = null;
- }
+ result = currentEntry.getLettering();
break;
case 6: //Debit
result = currentEntry.getDebit() ? currentEntry.getAmount() : BigDecimal.ZERO;
@@ -496,7 +491,7 @@
currentEntry.setDebit(false);
break;
case 8:
- currentEntry.setLetter((Letter) value);
+ currentEntry.setLettering((String) value);
break;
}
try {
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-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -37,7 +37,6 @@
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialTransaction;
-import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
import org.chorem.lima.util.DialogHelper;
@@ -116,8 +115,8 @@
financialTransactionSearch.setDescription(result);
}
- public void setLetter(Letter letter) {
- financialTransactionSearch.setLetter(letter);
+ public void setLetter(String lettering) {
+ financialTransactionSearch.setLettering(lettering);
}
public String getAccountsList() {
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchComboBox.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -1,95 +0,0 @@
-/*
- * #%L
- * Lima Swing
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.ui.financialtransactionsearch;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.Letter;
-import org.chorem.lima.ui.LimaRendererUtil;
-import org.chorem.lima.ui.combobox.LetterComboBoxModel;
-import org.chorem.lima.util.LetterToString;
-import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
-
-import javax.swing.JComboBox;
-import javax.swing.ListCellRenderer;
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-
-public class LetterSearchComboBox extends JComboBox implements KeyListener {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log =
- LogFactory.getLog(LetterSearchComboBox.class);
-
- protected FinancialTransactionSearchViewHandler handler;
-
- public LetterSearchComboBox(FinancialTransactionSearchViewHandler handler) {
- this.handler = handler;
- LetterComboBoxModel letterComboBoxModel = new LetterComboBoxModel();
- ListCellRenderer renderer =
- LimaRendererUtil.newDecoratorListCellRenderer(Letter.class);
- setModel(letterComboBoxModel);
- setRenderer(renderer);
- setEditable(true);
- AutoCompleteDecorator.decorate(this, LetterToString.getInstance());
- getEditor().getEditorComponent().addKeyListener(this);
- addActionListener(this);
- }
-
- @Override
- public void actionPerformed(ActionEvent e) {
- Object object = getSelectedItem();
- if (object instanceof Letter) {
- handler.setLetter((Letter) getSelectedItem());
- }
- }
-
-
- @Override
- public void keyPressed(KeyEvent e) {
-
- }
-
- @Override
- public void keyReleased(KeyEvent e) {
- Object object = getSelectedItem();
- if (object instanceof Letter) {
- handler.setLetter((Letter) getSelectedItem());
- }
- // delegate popup list menu
- if (e.getKeyChar() == KeyEvent.VK_ENTER) {
- firePopupMenuCanceled();
- }
- }
-
- @Override
- public void keyTyped(KeyEvent e) {
-
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/LetterSearchPanel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -5,7 +5,7 @@
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2008 - 2010 CodeLutin
+ * 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
@@ -31,6 +31,9 @@
public class LetterSearchPanel extends JPanel {
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 7682668138031148237L;
+
protected FinancialTransactionSearchViewHandler handler;
public LetterSearchPanel(FinancialTransactionSearchViewHandler handler) {
@@ -47,9 +50,9 @@
break;
case SELECT_ONE:
- LetterSearchComboBox comboBox = new LetterSearchComboBox(handler);
+ /*LetterSearchComboBox comboBox = new LetterSearchComboBox(handler);
removeAll();
- add(comboBox);
+ add(comboBox);*/
break;
}
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-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -38,7 +38,6 @@
import org.chorem.lima.entity.EntryImpl;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -169,7 +168,7 @@
result = BigDecimal.class;
break;
case 8:
- result = Letter.class;
+ result = String.class;
break;
}
@@ -303,11 +302,7 @@
result = null;
break;
case 8:
- if (currentEntry.getLetter() != null) {
- result = currentEntry.getLetter().getCode();
- } else {
- result = null;
- }
+ result = currentEntry.getLettering();
break;
}
@@ -426,7 +421,7 @@
currentEntry.setDebit(false);
break;
case 8:
- currentEntry.setLetter((Letter) value);
+ currentEntry.setLettering((String) value);
break;
}
try {
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/AddLetterForm.jaxx 2012-04-12 16:37:45 UTC (rev 3365)
@@ -66,7 +66,7 @@
</cell>
<cell>
<JComboBox id='LetterListComboBox' visible="{listLetter.isSelected()}"
- javaBean="new LetterComboBox()"/>
+ javaBean="new JComboBox()"/>
</cell>
</row>
<row>
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetterComboBox.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -1,58 +0,0 @@
-/*
- * #%L
- * Lima Swing
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.ui.lettering;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.Letter;
-import org.chorem.lima.ui.LimaRendererUtil;
-import org.chorem.lima.ui.combobox.LetterComboBoxModel;
-import org.chorem.lima.util.LetterToString;
-import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
-
-import javax.swing.JComboBox;
-import javax.swing.ListCellRenderer;
-
-public class LetterComboBox extends JComboBox {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log =
- LogFactory.getLog(LetterComboBox.class);
-
-
- public LetterComboBox() {
-
- LetterComboBoxModel letterComboBoxModel = new LetterComboBoxModel();
- ListCellRenderer renderer =
- LimaRendererUtil.newDecoratorListCellRenderer(Letter.class);
- setModel(letterComboBoxModel);
- setRenderer(renderer);
- setEditable(true);
- AutoCompleteDecorator.decorate(this, LetterToString.getInstance());
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTable.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -29,13 +29,11 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.Letter;
import org.chorem.lima.ui.celleditor.AccountTableCellEditor;
import org.chorem.lima.ui.celleditor.BigDecimalTableCellEditor;
import org.chorem.lima.ui.celleditor.BigDecimalTableCellRenderer;
import org.chorem.lima.ui.celleditor.DateTableCellEditor;
import org.chorem.lima.ui.celleditor.EntryBookTableCellEditor;
-import org.chorem.lima.ui.celleditor.LetterTableCellEditor;
import org.jdesktop.swingx.JXTable;
import org.jdesktop.swingx.decorator.ColorHighlighter;
import org.jdesktop.swingx.decorator.ComponentAdapter;
@@ -86,8 +84,7 @@
setDefaultEditor(EntryBook.class, new EntryBookTableCellEditor());
//Get new account editor
setDefaultEditor(Account.class, new AccountTableCellEditor());
- //Get new letter editor
- setDefaultEditor(Letter.class, new LetterTableCellEditor());
+
//Get new amount editor
setDefaultEditor(BigDecimal.class, new BigDecimalTableCellEditor());
//Get new BigDecimal renderer
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-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -37,7 +37,6 @@
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialTransaction;
-import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.util.DialogHelper;
import org.chorem.lima.util.ErrorHelper;
@@ -142,7 +141,7 @@
return results;
}
- public void setLetter(int row, Letter letter) {
+ /*public void setLetter(int row, Letter letter) {
Object currentRow = cacheDataList.get(row);
if (currentRow instanceof Entry) {
Entry entry = (Entry) currentRow;
@@ -163,10 +162,10 @@
f.dispose();
}
}
- }
+ }*/
public void removeLetter(int row) {
- try {
+ /*try {
Object currentRow = cacheDataList.get(row);
if (currentRow instanceof Entry) {
Entry entry = (Entry) currentRow;
@@ -174,7 +173,7 @@
}
} catch (LimaException eee) {
log.error("Can't remove letter", eee);
- }
+ }*/
}
public void refresh() {
@@ -209,7 +208,7 @@
result = String.class;
break;
case 5:
- result = Letter.class;
+ result = String.class;
break;
case 6:
result = BigDecimal.class;
@@ -343,11 +342,7 @@
result = currentEntry.getDescription();
break;
case 5:
- if (currentEntry.getLetter() != null) {
- result = currentEntry.getLetter().getCode();
- } else {
- result = null;
- }
+ result = currentEntry.getLettering();
break;
case 6:
result = currentEntry.getDebit() ? currentEntry.getAmount() : BigDecimal.ZERO;
@@ -400,7 +395,7 @@
Entry currentEntry = (Entry) currentRow;
switch (column) {
case 5:
- currentEntry.setLetter((Letter) value);
+ currentEntry.setLettering((String) value);
break;
}
try {
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-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -29,7 +29,6 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.monitorable.FinancialTransactionServiceMonitorable;
-import org.chorem.lima.entity.Letter;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
@@ -92,8 +91,7 @@
}
public void addLetter() {
- Letter letter = null;
- Boolean valid = true;
+ /*Boolean valid = true;
table = view.getTable();
tableModel = view.getTableModel();
@@ -132,7 +130,7 @@
}
tableModel.refresh();
}
- }
+ }*/
}
public void removeLetter() {
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-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatchart/VatChartViewHandler.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -93,7 +93,7 @@
// null == cancel action
if (newVatChartMovement != null) {
- newVatChartMovement.setAmount(BigDecimal.ZERO);
+
// add it
try {
treeTableModel.addVatStatement(treePath, newVatChartMovement);
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java 2012-04-12 14:24:21 UTC (rev 3364)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/LetterToString.java 2012-04-12 16:37:45 UTC (rev 3365)
@@ -1,65 +0,0 @@
-/*
- * #%L
- * Lima Swing
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.util;
-
-import org.chorem.lima.LimaContext;
-import org.chorem.lima.entity.Letter;
-import org.jdesktop.swingx.autocomplete.ObjectToStringConverter;
-import org.nuiton.util.decorator.Decorator;
-import org.nuiton.util.decorator.DecoratorProvider;
-
-public class LetterToString extends ObjectToStringConverter {
-
- private static LetterToString converter;
-
- protected Decorator<Letter> decorator;
-
- public LetterToString() {
-
- DecoratorProvider provider = LimaContext.get().getDecoratorProvider();
- decorator = provider.getDecoratorByType(Letter.class);
- }
-
- @Override
- public String getPreferredStringForItem(Object item) {
- String result = null;
- if (item != null) {
- if (item instanceof Letter) {
- Letter letter = (Letter) item;
- result = decorator.toString(letter);
- }
- }
- return result;
- }
-
- public static LetterToString getInstance() {
- if (converter == null) {
- converter = new LetterToString();
- }
- return converter;
- }
-
-}
1
0
Author: echatellier
Date: 2012-04-12 16:24:21 +0200 (Thu, 12 Apr 2012)
New Revision: 3364
Url: http://chorem.org/repositories/revision/lima/3364
Log:
svn:ignore
Modified:
trunk/lima-business-api/
Property changes on: trunk/lima-business-api
___________________________________________________________________
Modified: svn:ignore
- target
.idea
.classpath
.project
.settigns
*.ipr
*.iws
*.iml
+ target
.idea
.classpath
.project
.settigns
*.ipr
*.iws
*.iml
.settings
1
0
r3363 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-swing/src/main/java/org/chorem/lima/ui lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod
by echatellier@users.chorem.org 12 Apr '12
by echatellier@users.chorem.org 12 Apr '12
12 Apr '12
Author: echatellier
Date: 2012-04-12 16:23:46 +0200 (Thu, 12 Apr 2012)
New Revision: 3363
Url: http://chorem.org/repositories/revision/lima/3363
Log:
Misc code style update
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaModelUtil.java
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-04-12 14:23:28 UTC (rev 3362)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-04-12 14:23:46 UTC (rev 3363)
@@ -86,7 +86,6 @@
@Override
public void start() {
if (server == null) {
-
try {
FileUtil.createDirectoryIfNecessary(new File(path));
@@ -98,7 +97,9 @@
server.setHandler(context);
server.start();
- log.info("Web server are running on port: " + port);
+ if (log.isInfoEnabled()) {
+ log.info("Web server are running on port: " + port);
+ }
} catch (Exception eee) {
log.error("error while booting http server", eee);
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx 2012-04-12 14:23:28 UTC (rev 3362)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ClosableTabHeader.jaxx 2012-04-12 14:23:46 UTC (rev 3363)
@@ -5,7 +5,7 @@
$Id$
$HeadURL$
%%
- Copyright (C) 2008 - 2010 CodeLutin
+ 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
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaModelUtil.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaModelUtil.java 2012-04-12 14:23:28 UTC (rev 3362)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/LimaModelUtil.java 2012-04-12 14:23:46 UTC (rev 3363)
@@ -1,36 +0,0 @@
-/*
- * #%L
- * Lima :: Swing
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2011 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%
- */
-package org.chorem.lima.ui;
-
-/**
- * Util to create ui models.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 0.5.2
- */
-public class LimaModelUtil {
-
-
-}
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-12 14:23:28 UTC (rev 3362)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-04-12 14:23:46 UTC (rev 3363)
@@ -56,7 +56,6 @@
import org.chorem.lima.ui.vatchart.VatChartView;
import org.chorem.lima.ui.vatreports.VatReportView;
import org.chorem.lima.util.ErrorHelper;
-import org.nuiton.profiling.NuitonTrace;
import org.nuiton.util.DesktopUtil;
import javax.swing.JButton;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-04-12 14:23:28 UTC (rev 3362)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-04-12 14:23:46 UTC (rev 3363)
@@ -122,15 +122,14 @@
//check if fiscalperiod have 12 months, ask a confirmation
int nbMonth = DateUtil.getDifferenceInMonths(fiscalPeriod.getBeginDate(),
fiscalPeriod.getEndDate());
- int response = JOptionPane.NO_OPTION;
+ int response = JOptionPane.YES_OPTION;
if (nbMonth != 12) {
response = JOptionPane.showConfirmDialog(view,
_("lima.ui.fiscalperiod.addfiscalperiod.morethan12"),
_("lima.ui.fiscalperiod.addfiscalperiodtitle"),
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
}
- // FIXME echatellier 20120405 je ne comprend pas le "|| nbMonth == 11"
- if (response == JOptionPane.YES_OPTION || nbMonth == 11) {
+ if (response == JOptionPane.YES_OPTION) {
try {
fiscalPeriod = fiscalPeriodService.createFiscalPeriod(fiscalPeriod);
model.addFiscalPeriod(fiscalPeriod);
1
0
r3362 - in trunk: lima-business/src/main/java/org/chorem/lima/business/ejb lima-callao/src/main/xmi
by echatellier@users.chorem.org 12 Apr '12
by echatellier@users.chorem.org 12 Apr '12
12 Apr '12
Author: echatellier
Date: 2012-04-12 16:23:28 +0200 (Thu, 12 Apr 2012)
New Revision: 3362
Url: http://chorem.org/repositories/revision/lima/3362
Log:
Remove FinancialPeriod to FinancialTransaction visibility
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-callao/src/main/xmi/accounting.zargo
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-12 13:37:36 UTC (rev 3361)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-12 14:23:28 UTC (rev 3362)
@@ -1343,7 +1343,7 @@
.findByDate(dateFinancialTransaction);
financialTransactionDAO.create(financialTransaction);
- financialPeriod.addFinancialTransaction(financialTransaction);
+ financialTransaction.setFinancialPeriod(financialPeriod);
List<EntryImport> entryImports = entries.get(map.getKey());
for (EntryImport entryImport : entryImports) {
Modified: trunk/lima-callao/src/main/xmi/accounting.zargo
===================================================================
(Binary files differ)
1
0
r3361 - trunk/lima-swing/src/main/java/org/chorem/lima/ui
by echatellier@users.chorem.org 12 Apr '12
by echatellier@users.chorem.org 12 Apr '12
12 Apr '12
Author: echatellier
Date: 2012-04-12 15:37:36 +0200 (Thu, 12 Apr 2012)
New Revision: 3361
Url: http://chorem.org/repositories/revision/lima/3361
Log:
New killer feature : beta version layer
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java 2012-04-12 13:37:36 UTC (rev 3361)
@@ -0,0 +1,76 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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 Lesser 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.chorem.lima.ui;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+
+import javax.swing.JComponent;
+
+import org.jdesktop.jxlayer.JXLayer;
+import org.jdesktop.jxlayer.plaf.AbstractLayerUI;
+
+/**
+ * Layer qui affiche "beta version".
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class BetaLayerUI extends AbstractLayerUI<JComponent> {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 309245880711380974L;
+
+ @Override
+ protected void paintLayer(Graphics2D g2, JXLayer<? extends JComponent> l) {
+ super.paintLayer(g2, l);
+
+ // position
+ //g2.translate(-35, 90); // top left
+ g2.translate(l.getBounds().getMaxX() - 140, l.getBounds().getMaxY()); // bottom right
+
+ // yellow backgroung
+ g2.rotate(Math.PI * -42 / 180);
+ g2.setColor(Color.YELLOW);
+ g2.fillRect(10, 10, 170, 30);
+
+ // text
+ g2.translate(30, 15);
+ g2.setFont(new Font("Dialog", Font.BOLD, 16));
+ g2.setColor(Color.BLACK);
+ g2.drawString("Beta version",10,10);
+
+ // for test only
+ g2.translate(15, 10);
+ g2.setFont(new Font("Dialog", Font.ITALIC, 10));
+ g2.setColor(Color.BLACK);
+ g2.drawString("(for test only)",10,10);
+ }
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2012-04-11 16:14:23 UTC (rev 3360)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainView.jaxx 2012-04-12 13:37:36 UTC (rev 3361)
@@ -41,6 +41,10 @@
<script><![CDATA[
+ void $afterCompleteSetup() {
+ SwingUtil.getLayer(mainPanel).setUI(betaLayer);
+ }
+
public LimaConfig getConfig() {
return LimaContext.CONFIG_DEF.getContextValue(getDelegateContext());
}
@@ -220,7 +224,8 @@
</JMenu>
</JMenu>
</JMenuBar>
- <JPanel layout='{new BorderLayout()}'>
+ <BetaLayerUI id="betaLayer" />
+ <JPanel id="mainPanel" layout='{new BorderLayout()}' decorator="boxed">
<JTabbedPane id="contentTabbedPane" constraints="BorderLayout.CENTER"/>
</JPanel>
1
0
Author: athimel
Date: 2012-04-11 18:14:23 +0200 (Wed, 11 Apr 2012)
New Revision: 3360
Url: http://chorem.org/repositories/revision/lima/3360
Log:
Remove lima-business-api dependency to javaee-api
Modified:
trunk/lima-business-api/LICENSE.txt
trunk/lima-business-api/README.txt
trunk/lima-business-api/changelog.txt
trunk/lima-business-api/pom.xml
trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/AccountServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/FiscalPeriodServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/ImportServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java
trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearService.java
trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearServiceImpl.java
trunk/lima-business/src/test/java/org/chorem/lima/entity/AccountDAOTest.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -38,6 +38,8 @@
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.util.ArrayList;
import java.util.Collections;
@@ -54,6 +56,8 @@
* @author Rémi Chapelet
*/
@Stateless
+(a)Remote(AccountService.class)
+(a)Local(AccountServiceLocal.class)
public class AccountServiceImpl extends AbstractLimaService implements AccountService, AccountServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -74,8 +74,10 @@
import org.nuiton.topia.framework.TopiaQuery.Op;
import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
-import java.awt.Color;
+import java.awt.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@@ -91,6 +93,8 @@
import static org.nuiton.i18n.I18n._;
@Stateless
+(a)Remote(DocumentService.class)
+(a)Local(DocumentServiceLocal.class)
public class DocumentServiceImpl extends AbstractLimaService implements DocumentService, DocumentServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,13 +25,6 @@
package org.chorem.lima.business.ejb;
-import static org.nuiton.i18n.I18n._;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.ejb.Stateless;
-
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaConfig;
@@ -49,6 +42,14 @@
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.nuiton.i18n.I18n._;
+
/**
* Implémente la fonction multi-EntryBook. Il est possible de créer ici le
* EntryBook des ventes, le EntryBook des achats, etc.
@@ -56,6 +57,8 @@
* @author Rémi Chapelet
*/
@Stateless
+(a)Remote(EntryBookService.class)
+(a)Local(EntryBookServiceLocal.class)
public class EntryBookServiceImpl extends AbstractLimaService implements EntryBookService, EntryBookServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -54,6 +54,8 @@
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
@@ -68,6 +70,8 @@
* By : $Author$
*/
@Stateless
+(a)Remote(ExportService.class)
+(a)Local(ExportServiceLocal.class)
public class ExportServiceImpl extends AbstractLimaService implements ExportService, ExportServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -43,6 +43,8 @@
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.util.Date;
import java.util.List;
@@ -55,6 +57,8 @@
* @author Rémi Chapelet
*/
@Stateless
+(a)Remote(FinancialPeriodService.class)
+(a)Local(FinancialPeriodServiceLocal.class)
public class FinancialPeriodServiceImpl extends AbstractLimaService implements FinancialPeriodService, FinancialPeriodServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -49,6 +49,8 @@
import org.nuiton.topia.framework.TopiaQuery.Op;
import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -59,6 +61,8 @@
import static org.nuiton.i18n.I18n._;
@Stateless
+(a)Remote(FinancialStatementService.class)
+(a)Local(FinancialStatementServiceLocal.class)
public class FinancialStatementServiceImpl extends AbstractLimaService implements FinancialStatementService, FinancialStatementServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -56,6 +56,8 @@
import org.nuiton.topia.framework.TopiaQuery.Op;
import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -72,6 +74,8 @@
* @author Rémi Chapelet
*/
@Stateless
+(a)Remote(FinancialTransactionService.class)
+(a)Local(FinancialTransactionServiceLocal.class)
public class FinancialTransactionServiceImpl extends AbstractLimaService implements FinancialTransactionService, FinancialTransactionServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -57,6 +57,8 @@
import org.nuiton.topia.framework.TopiaQuery;
import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -76,6 +78,8 @@
* @author Rémi Chapelet
*/
@Stateless
+(a)Remote(FiscalPeriodService.class)
+(a)Local(FiscalPeriodServiceLocal.class)
public class FiscalPeriodServiceImpl extends AbstractLimaService implements FiscalPeriodService, FiscalPeriodServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,25 +25,6 @@
package org.chorem.lima.business.ejb;
-import static org.nuiton.i18n.I18n._;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.ejb.EJB;
-import javax.ejb.Stateless;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.chorem.lima.business.LimaConfig;
@@ -60,7 +41,29 @@
import org.nuiton.util.FileUtil;
import org.nuiton.util.Resource;
+import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+import static org.nuiton.i18n.I18n._;
+
@Stateless
+(a)Remote(HttpServerService.class)
+(a)Local(HttpServerServiceLocal.class)
public class HttpServerServiceImpl extends AbstractLimaService implements HttpServerService, HttpServerServiceLocal {
@EJB
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -34,10 +34,14 @@
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.util.List;
@Stateless
+(a)Remote(IdentityService.class)
+(a)Local(IdentityServiceLocal.class)
public class IdentityServiceImpl extends AbstractLimaService implements IdentityService, IdentityServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -104,6 +104,8 @@
import org.nuiton.topia.TopiaException;
import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.io.File;
import java.io.FileInputStream;
@@ -131,6 +133,8 @@
* Currently import and export as CSV and EBP.
*/
@Stateless
+(a)Remote(ImportService.class)
+(a)Local(ImportServiceLocal.class)
public class ImportServiceImpl extends AbstractLimaService implements ImportService, ImportServiceLocal {
private static final Log log = LogFactory.getLog(ImportServiceImpl.class);
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -28,9 +28,13 @@
import org.chorem.lima.business.api.OptionsService;
import org.chorem.lima.business.api.OptionsServiceLocal;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
@Stateless
+(a)Remote(OptionsService.class)
+(a)Local(OptionsServiceLocal.class)
public class OptionsServiceImpl extends AbstractLimaService implements OptionsService, OptionsServiceLocal {
protected String scale;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -49,6 +49,8 @@
import org.nuiton.topia.framework.TopiaQuery;
import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -56,6 +58,8 @@
import java.util.List;
@Stateless
+(a)Remote(ReportService.class)
+(a)Local(ReportServiceLocal.class)
public class ReportServiceImpl extends AbstractLimaService implements ReportService, ReportServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -48,6 +48,8 @@
import org.nuiton.topia.framework.TopiaQuery.Op;
import javax.ejb.EJB;
+import javax.ejb.Local;
+import javax.ejb.Remote;
import javax.ejb.Stateless;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -61,6 +63,8 @@
* @author vsalaun
*/
@Stateless
+(a)Remote(VatStatementService.class)
+(a)Local(VatStatementServiceLocal.class)
public class VatStatementServiceImpl extends AbstractLimaService implements VatStatementService, VatStatementServiceLocal {
private TopiaContext rootContext;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,6 +25,15 @@
package org.chorem.lima.service;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.business.ServiceMonitorable;
+import org.nuiton.util.ApplicationConfig;
+
+import javax.ejb.embeddable.EJBContainer;
+import javax.naming.NamingException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationHandler;
@@ -33,16 +42,6 @@
import java.util.Map;
import java.util.Properties;
-import javax.ejb.embeddable.EJBContainer;
-import javax.naming.NamingException;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ServiceMonitorable;
-import org.nuiton.util.ApplicationConfig;
-
/** This class is a service factory based on embedded openejb container. */
public class LimaServiceFactory {
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-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -23,23 +23,12 @@
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;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaConfig.Option;
import org.chorem.lima.business.accountingrules.TestAccountingRules;
-import org.chorem.lima.business.ejb.ClearService;
-import org.chorem.lima.business.ejb.ClearServiceMonitorable;
import org.chorem.lima.business.api.AccountService;
import org.chorem.lima.business.api.EntryBookService;
import org.chorem.lima.business.api.FinancialPeriodService;
@@ -47,6 +36,8 @@
import org.chorem.lima.business.api.FiscalPeriodService;
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;
@@ -76,6 +67,15 @@
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.
*
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/AccountServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/AccountServiceImplTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/AccountServiceImplTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,15 +25,15 @@
package org.chorem.lima.business;
-import java.text.ParseException;
-import java.util.List;
-
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountImpl;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
+import java.text.ParseException;
+import java.util.List;
+
/**
* Tests pour la gestion des comptes dans le plan comptable.
*
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/EntryBookServiceImplTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,8 +25,6 @@
package org.chorem.lima.business;
-import java.text.ParseException;
-
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.EntryBookImpl;
import org.junit.Assert;
@@ -34,6 +32,8 @@
import org.junit.Ignore;
import org.junit.Test;
+import java.text.ParseException;
+
/**
* Tests pour la gestion des journaux.
* <p/>
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialPeriodServiceImplTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,11 +25,11 @@
package org.chorem.lima.business;
-import java.text.ParseException;
-
import org.junit.Before;
import org.junit.Test;
+import java.text.ParseException;
+
/**
* Tests pour la gestion des timespans
* <p/>
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/FinancialTransactionServiceImplTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -23,10 +23,6 @@
package org.chorem.lima.business;
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.util.List;
-
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
import org.chorem.lima.entity.EntryBook;
@@ -39,6 +35,10 @@
import org.junit.Before;
import org.junit.Test;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.util.List;
+
/**
* Test on financial transaction service.
*
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/FiscalPeriodServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/FiscalPeriodServiceImplTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/FiscalPeriodServiceImplTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,8 +25,6 @@
package org.chorem.lima.business;
-import java.text.ParseException;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.ejb.FiscalPeriodServiceImpl;
@@ -39,6 +37,8 @@
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.TopiaNotFoundException;
+import java.text.ParseException;
+
/**
* Tests pour la gestion des périodes
* <p/>
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/ImportServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/ImportServiceImplTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/ImportServiceImplTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,10 +25,6 @@
package org.chorem.lima.business;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-
import org.apache.commons.io.IOUtils;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.FiscalPeriod;
@@ -36,6 +32,10 @@
import org.junit.Assert;
import org.junit.Test;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+
/**
* Test du service d'import en faisant des import/export EBP et xml.
*
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/ReportServiceImplTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,10 +25,6 @@
package org.chorem.lima.business;
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.util.Date;
-
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
@@ -41,6 +37,10 @@
import org.junit.Before;
import org.junit.Test;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.util.Date;
+
/**
* Test le service de génération des reports.
*/
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -23,13 +23,6 @@
package org.chorem.lima.business.accountingrules;
-import static org.nuiton.i18n.I18n._;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
import org.apache.commons.lang3.time.DateUtils;
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
@@ -43,6 +36,13 @@
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.TopiaQuery;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import static org.nuiton.i18n.I18n._;
+
/**
* Cette classe existe car les tests tourne 2 fois:
* - default
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearService.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -23,10 +23,10 @@
package org.chorem.lima.business.ejb;
+import org.chorem.lima.business.LimaException;
+
import javax.ejb.Remote;
-import org.chorem.lima.business.LimaException;
-
/**
* Clear database service.
*
Modified: trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearServiceImpl.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/ejb/ClearServiceImpl.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -23,12 +23,12 @@
package org.chorem.lima.business.ejb;
-import javax.ejb.Stateless;
-
import org.chorem.lima.business.LimaException;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import javax.ejb.Stateless;
+
/**
* Clear database service.
*
Modified: trunk/lima-business/src/test/java/org/chorem/lima/entity/AccountDAOTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/entity/AccountDAOTest.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business/src/test/java/org/chorem/lima/entity/AccountDAOTest.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,13 +25,13 @@
package org.chorem.lima.entity;
-import java.util.List;
-
import org.chorem.lima.business.AbstractLimaTest;
import org.junit.Assert;
import org.junit.Test;
import org.nuiton.topia.TopiaException;
+import java.util.List;
+
/**
* Test for AccountDAO class.
*
Property changes on: trunk/lima-business-api/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/lima-business-api/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: trunk/lima-business-api/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/lima-business-api/pom.xml
===================================================================
--- trunk/lima-business-api/pom.xml 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/pom.xml 2012-04-11 16:14:23 UTC (rev 3360)
@@ -17,11 +17,6 @@
<dependencies>
<dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>javaee-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>${project.groupId}</groupId>
<artifactId>lima-callao</artifactId>
<version>${project.version}</version>
Property changes on: trunk/lima-business-api/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -36,7 +36,9 @@
*/
public class LimaException extends Exception {
- /** serialVersionUID. */
+ /**
+ * serialVersionUID.
+ */
private static final long serialVersionUID = -6876236663940184462L;
/**
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -28,7 +28,6 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Account;
-import javax.ejb.Remote;
import java.util.List;
/**
@@ -40,12 +39,11 @@
* Last update : $Date$
* By : $Author$
*/
-@Remote
public interface AccountService {
/**
* Return account count.
- *
+ *
* @return account count
* @throws LimaException technical exception
*/
@@ -56,9 +54,9 @@
/**
* Obtain the master account for the given account number.
- *
+ * <p/>
* the master account if the account with the longer account number prefixing the given account number.
- *
+ * <p/>
* Example: for account number 401AB, it could be 4, 40, 401,...
*
* @param accountNumber the account number
@@ -71,7 +69,7 @@
/**
* Return all account ordered by account name.
- *
+ *
* @return all account
* @throws LimaException
*/
@@ -83,7 +81,7 @@
* Create new account. If {@code masterAccount} is not null, {@code account}
* is added in {@code masterAccount}'s subAccounts.
*
- * @param account account
+ * @param account account
* @throws LimaException
*/
Account createAccount(Account account) throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -29,8 +29,6 @@
import org.chorem.lima.entity.Account;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
-
/**
* Account service.
*
@@ -40,7 +38,6 @@
* Last update : $Date$
* By : $Author$
*/
-@Local
public interface AccountServiceLocal extends AccountService {
Account createAccountWithTransaction(Account account, TopiaContext topiaContext) throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -28,7 +28,6 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.utils.FormatsEnum;
-import javax.ejb.Remote;
import java.util.Date;
/**
@@ -37,7 +36,6 @@
* @author john
*/
-@Remote
public interface DocumentService {
void createFinancialStatementsDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,15 +25,12 @@
package org.chorem.lima.business.api;
-import javax.ejb.Local;
-
/**
* Interface to create pdf and html docs
*
* @author john
*/
-@Local
public interface DocumentServiceLocal extends DocumentService {
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -28,7 +28,6 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.EntryBook;
-import javax.ejb.Remote;
import java.util.List;
/**
@@ -36,25 +35,24 @@
*
* @author chatellier
* @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
*/
-@Remote
public interface EntryBookService {
/**
* Find entry book by code.
- *
+ *
* @param code entry book code
- * @return
+ * @return
* @throws LimaException
*/
EntryBook getEntryBookByCode(String code) throws LimaException;
/**
* Get all entry book.
- *
+ *
* @return all entrybook
* @throws LimaException
*/
@@ -62,7 +60,7 @@
/**
* Create new entry book.
- *
+ *
* @param entryBook
* @throws LimaException
*/
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -29,9 +29,7 @@
import org.chorem.lima.entity.EntryBook;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
-
/**
* Entry book service.
*
@@ -42,7 +40,6 @@
* By : $Author$
*/
-@Local
public interface EntryBookServiceLocal extends EntryBookService {
EntryBook createEntryBookWithTransaction(EntryBook entryBook, TopiaContext topiaContext) throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -27,8 +27,6 @@
import org.chorem.lima.business.LimaException;
-import javax.ejb.Remote;
-
/**
* Import export service.
* <p/>
@@ -40,7 +38,6 @@
* Last update : $Date$
* By : $Author$
*/
-@Remote
public interface ExportService {
@@ -52,22 +49,34 @@
*/
String exportAsCSV() throws LimaException;
- /** export entrybook chart as CSV. */
+ /**
+ * export entrybook chart as CSV.
+ */
String exportEntryBookChartAsCSV() throws LimaException;
- /** export financialstatement chart as CSV. */
+ /**
+ * export financialstatement chart as CSV.
+ */
String exportFinancialStatementChartAsCSV() throws LimaException;
- /** export vatstatement chart as CSV */
+ /**
+ * export vatstatement chart as CSV
+ */
String exportVatStatementChartAsCSV() throws LimaException;
- /** export accounts chart as CSV. */
+ /**
+ * export accounts chart as CSV.
+ */
String exportAccountsChartAsCSV() throws LimaException;
- /** export entries as EBP */
+ /**
+ * export entries as EBP
+ */
String exportEntriesAsEBP() throws LimaException;
- /** export accounts as EBP */
+ /**
+ * export accounts as EBP
+ */
String exportAccountsAsEBP() throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,8 +25,6 @@
package org.chorem.lima.business.api;
-import javax.ejb.Local;
-
/**
* Import export service.
* <p/>
@@ -38,7 +36,6 @@
* Last update : $Date$
* By : $Author$
*/
-@Local
public interface ExportServiceLocal extends ExportService {
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -30,7 +30,6 @@
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialPeriod;
-import javax.ejb.Remote;
import java.util.Date;
import java.util.List;
@@ -44,7 +43,6 @@
* By : $Author$
*/
-@Remote
public interface FinancialPeriodService {
List<FinancialPeriod> getUnblockedFinancialPeriods() throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -30,7 +30,6 @@
import org.chorem.lima.entity.FinancialPeriod;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
import java.util.List;
@@ -44,7 +43,6 @@
* By : $Author$
*/
-@Local
public interface FinancialPeriodServiceLocal extends FinancialPeriodService {
void createFinancialPeriodsWithTransaction(List<FinancialPeriod> financialPeriods,
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -29,11 +29,9 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.FinancialStatement;
-import javax.ejb.Remote;
import java.util.Date;
import java.util.List;
-@Remote
public interface FinancialStatementService {
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -29,9 +29,6 @@
import org.chorem.lima.entity.FinancialStatement;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
-
-@Local
public interface FinancialStatementServiceLocal extends FinancialStatementService {
void createFinancialStatementWithTransaction(FinancialStatement masterFinancialStatement,
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -34,7 +34,6 @@
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.Letter;
-import javax.ejb.Remote;
import java.util.Date;
import java.util.List;
@@ -48,7 +47,6 @@
* By : $Author$
*/
-@Remote
public interface FinancialTransactionService {
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -30,8 +30,6 @@
import org.chorem.lima.entity.FinancialTransaction;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
-
/**
* Transaction service.
*
@@ -42,7 +40,6 @@
* By : $Author$
*/
-@Local
public interface FinancialTransactionServiceLocal extends FinancialTransactionService {
FinancialTransaction createFinancialTransactionWithTransaction(FinancialTransaction financialtransaction,
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -29,7 +29,6 @@
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FiscalPeriod;
-import javax.ejb.Remote;
import java.util.List;
/**
@@ -41,7 +40,6 @@
* Last update : $Date$
* By : $Author$
*/
-@Remote
public interface FiscalPeriodService {
List<FiscalPeriod> getAllFiscalPeriods() throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -29,8 +29,6 @@
import org.chorem.lima.entity.FiscalPeriod;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
-
/**
* Fiscal period service.
*
@@ -40,11 +38,10 @@
* Last update : $Date$
* By : $Author$
*/
-@Local
public interface FiscalPeriodServiceLocal extends FiscalPeriodService {
FiscalPeriod createFiscalPeriodWithTransaction(FiscalPeriod fiscalPeriod,
- TopiaContext topiaContext) throws LimaException;
+ TopiaContext topiaContext) throws LimaException;
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,9 +25,6 @@
package org.chorem.lima.business.api;
-import javax.ejb.Remote;
-
-@Remote
public interface HttpServerService {
void start();
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,9 +25,6 @@
package org.chorem.lima.business.api;
-import javax.ejb.Local;
-
-@Local
public interface HttpServerServiceLocal extends HttpServerService {
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -28,9 +28,6 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.Identity;
-import javax.ejb.Remote;
-
-@Remote
public interface IdentityService {
Identity getIdentity() throws LimaException;
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -29,9 +29,6 @@
import org.chorem.lima.entity.Identity;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
-
-@Local
public interface IdentityServiceLocal extends IdentityService {
void updateIdentityWithTransaction(Identity identity,
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -28,13 +28,10 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.utils.ImportExportEntityEnum;
-import javax.ejb.Remote;
-
/**
* Import export service.
* Currently import and export as CSV and EBP.
*/
-@Remote
public interface ImportService {
/**
@@ -57,19 +54,19 @@
/**
* Import data as lima CSV import.
- *
+ * <p/>
* Read first line to detect file type and call {@link #importAsCSV(String, ImportExportEntityEnum)}.
- *
+ *
* @param data import file content as string (remote service can't take File)
* @return result log
- * @throws LimaException
+ * @throws LimaException
*/
String importAllAsCSV(String data) throws LimaException;
/**
* Import content as CSV depending on import type.
- *
- * @param data import file content as string (remote service can't take File)
+ *
+ * @param data import file content as string (remote service can't take File)
* @param importExportEntityEnum import type
* @return result log
* @throws LimaException
@@ -79,7 +76,7 @@
/**
* @deprecated import file (local, can't be used in remote mode)
- * and wrong place for this method
+ * and wrong place for this method
*/
String importAsPDF(String data,
ImportExportEntityEnum importExportEntityEnum,
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -25,8 +25,6 @@
package org.chorem.lima.business.api;
-import javax.ejb.Local;
-
/**
* Import export service.
* <p/>
@@ -38,7 +36,6 @@
* Last update : $Date$
* By : $Author$
*/
-@Local
public interface ImportServiceLocal extends ImportService {
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -24,8 +24,6 @@
*/
package org.chorem.lima.business.api;
-import javax.ejb.Remote;
-
/**
* Service de report des certaines configurations du swing dans business
* <p/>
@@ -37,7 +35,6 @@
* @author salaun
*/
-@Remote
public interface OptionsService {
/**
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -24,9 +24,6 @@
*/
package org.chorem.lima.business.api;
-import javax.ejb.Local;
-
-@Local
public interface OptionsServiceLocal extends OptionsService {
}
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -33,7 +33,6 @@
import org.chorem.lima.entity.FiscalPeriod;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Remote;
import java.util.Date;
import java.util.List;
@@ -54,7 +53,6 @@
* By : $Author$
*/
-@Remote
public interface ReportService {
/**
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -30,7 +30,6 @@
import org.chorem.lima.entity.Account;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
import java.util.Date;
@@ -50,7 +49,6 @@
* By : $Author$
*/
-@Local
public interface ReportServiceLocal extends ReportService {
ReportsDatas generateAccountReportsWithTransaction(Account account,
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -28,11 +28,9 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.entity.VatStatement;
-import javax.ejb.Remote;
import java.util.Date;
import java.util.List;
-@Remote
public interface VatStatementService {
void createVatStatement(VatStatement masterVatStatement,
Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java 2012-04-11 16:14:23 UTC (rev 3360)
@@ -30,10 +30,8 @@
import org.chorem.lima.entity.VatStatement;
import org.nuiton.topia.TopiaContext;
-import javax.ejb.Local;
import java.util.Date;
-@Local
public interface VatStatementServiceLocal extends VatStatementService {
void createVatStatementWithTransaction(
1
0
Author: athimel
Date: 2012-04-11 17:59:40 +0200 (Wed, 11 Apr 2012)
New Revision: 3359
Url: http://chorem.org/repositories/revision/lima/3359
Log:
Create a separated business API module that externalize business service public interfaces
Added:
trunk/lima-business-api/
trunk/lima-business-api/LICENSE.txt
trunk/lima-business-api/README.txt
trunk/lima-business-api/changelog.txt
trunk/lima-business-api/pom.xml
trunk/lima-business-api/src/
trunk/lima-business-api/src/main/
trunk/lima-business-api/src/main/java/
trunk/lima-business-api/src/main/java/org/
trunk/lima-business-api/src/main/java/org/chorem/
trunk/lima-business-api/src/main/java/org/chorem/lima/
trunk/lima-business-api/src/main/java/org/chorem/lima/business/
trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/
trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java
trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java
Removed:
trunk/lima-business/src/main/java/org/chorem/lima/business/LimaException.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java
trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java
Modified:
trunk/
trunk/lima-business/pom.xml
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/AccountServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/DocumentServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/EntryBookServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ExportServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialPeriodServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialStatementServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialTransactionServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FiscalPeriodServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/HttpServerServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/IdentityServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ImportServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/OptionsServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ReportServiceMonitorable.java
trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/VatStatementServiceMonitorable.java
trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java
trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.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/LetterComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.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/fiscalperiod/FiscalPeriodViewHandler.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/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/vatreports/VatReportTableModel.java
trunk/pom.xml
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- *.log
target
bin
.classpath
.project
*.ipr
*.iws
*.iml
.settings
+ *.log
target
bin
.classpath
.project
*.ipr
*.iws
*.iml
.settings
.idea
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/pom.xml 2012-04-11 15:59:40 UTC (rev 3359)
@@ -27,6 +27,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>lima-business-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
</dependency>
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaException.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaException.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaException.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,60 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business;
-
-/**
- * Lima exception.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-public class LimaException extends Exception {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = -6876236663940184462L;
-
- /**
- * Constructs a new exception with the specified detail message.
- *
- * @param message message
- */
- public LimaException(String message) {
- super(message);
- }
-
- /**
- * Constructs a new exception with the specified detail message and cause.
- *
- * @param message message
- * @param cause cause
- */
- public LimaException(String message, Throwable cause) {
- super(message, cause);
- }
-}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/AccountServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,8 +29,8 @@
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.AccountService;
-import org.chorem.lima.business.ejbinterface.AccountServiceLocal;
+import org.chorem.lima.business.api.AccountService;
+import org.chorem.lima.business.api.AccountServiceLocal;
import org.chorem.lima.business.utils.AccountComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -48,12 +48,12 @@
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.DocumentService;
-import org.chorem.lima.business.ejbinterface.DocumentServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialStatementServiceLocal;
-import org.chorem.lima.business.ejbinterface.IdentityServiceLocal;
-import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
-import org.chorem.lima.business.ejbinterface.VatStatementServiceLocal;
+import org.chorem.lima.business.api.DocumentService;
+import org.chorem.lima.business.api.DocumentServiceLocal;
+import org.chorem.lima.business.api.FinancialStatementServiceLocal;
+import org.chorem.lima.business.api.IdentityServiceLocal;
+import org.chorem.lima.business.api.ReportServiceLocal;
+import org.chorem.lima.business.api.VatStatementServiceLocal;
import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.EntryComparator;
import org.chorem.lima.business.utils.FormatsEnum;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/EntryBookServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -36,8 +36,8 @@
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.EntryBookService;
-import org.chorem.lima.business.ejbinterface.EntryBookServiceLocal;
+import org.chorem.lima.business.api.EntryBookService;
+import org.chorem.lima.business.api.EntryBookServiceLocal;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
import org.chorem.lima.entity.ClosedPeriodicEntryBookDAO;
import org.chorem.lima.entity.ClosedPeriodicEntryBookImpl;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,8 +29,8 @@
import org.apache.commons.lang3.StringUtils;
import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.ExportService;
-import org.chorem.lima.business.ejbinterface.ExportServiceLocal;
+import org.chorem.lima.business.api.ExportService;
+import org.chorem.lima.business.api.ExportServiceLocal;
import org.chorem.lima.business.utils.ImportExportEntityEnum;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -28,8 +28,8 @@
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodService;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodServiceLocal;
+import org.chorem.lima.business.api.FinancialPeriodService;
+import org.chorem.lima.business.api.FinancialPeriodServiceLocal;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
import org.chorem.lima.entity.ClosedPeriodicEntryBookDAO;
import org.chorem.lima.entity.ClosedPeriodicEntryBookImpl;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -35,9 +35,9 @@
import org.chorem.lima.beans.FinancialStatementDatasImpl;
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialStatementService;
-import org.chorem.lima.business.ejbinterface.FinancialStatementServiceLocal;
-import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
+import org.chorem.lima.business.api.FinancialStatementService;
+import org.chorem.lima.business.api.FinancialStatementServiceLocal;
+import org.chorem.lima.business.api.ReportServiceLocal;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.FinancialStatement;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -30,12 +30,12 @@
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.EntryBookServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionServiceLocal;
-import org.chorem.lima.business.ejbinterface.OptionsServiceLocal;
-import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
+import org.chorem.lima.business.api.EntryBookServiceLocal;
+import org.chorem.lima.business.api.FinancialPeriodServiceLocal;
+import org.chorem.lima.business.api.FinancialTransactionService;
+import org.chorem.lima.business.api.FinancialTransactionServiceLocal;
+import org.chorem.lima.business.api.OptionsServiceLocal;
+import org.chorem.lima.business.api.ReportServiceLocal;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.Entry;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -32,13 +32,13 @@
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.AccountServiceLocal;
-import org.chorem.lima.business.ejbinterface.EntryBookServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionServiceLocal;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodServiceLocal;
-import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
+import org.chorem.lima.business.api.AccountServiceLocal;
+import org.chorem.lima.business.api.EntryBookServiceLocal;
+import org.chorem.lima.business.api.FinancialPeriodServiceLocal;
+import org.chorem.lima.business.api.FinancialTransactionServiceLocal;
+import org.chorem.lima.business.api.FiscalPeriodService;
+import org.chorem.lima.business.api.FiscalPeriodServiceLocal;
+import org.chorem.lima.business.api.ReportServiceLocal;
import org.chorem.lima.business.utils.FinancialPeriodComparator;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountImpl;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -48,9 +48,9 @@
import org.apache.commons.lang3.time.DateUtils;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.DocumentServiceLocal;
-import org.chorem.lima.business.ejbinterface.HttpServerService;
-import org.chorem.lima.business.ejbinterface.HttpServerServiceLocal;
+import org.chorem.lima.business.api.DocumentServiceLocal;
+import org.chorem.lima.business.api.HttpServerService;
+import org.chorem.lima.business.api.HttpServerServiceLocal;
import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.FormatsEnum;
import org.eclipse.jetty.server.Server;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/IdentityServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,8 +26,8 @@
package org.chorem.lima.business.ejb;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.IdentityService;
-import org.chorem.lima.business.ejbinterface.IdentityServiceLocal;
+import org.chorem.lima.business.api.IdentityService;
+import org.chorem.lima.business.api.IdentityServiceLocal;
import org.chorem.lima.entity.Identity;
import org.chorem.lima.entity.IdentityDAO;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ImportServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -54,16 +54,16 @@
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaConfig;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.AccountServiceLocal;
-import org.chorem.lima.business.ejbinterface.EntryBookServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialStatementServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionServiceLocal;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodServiceLocal;
-import org.chorem.lima.business.ejbinterface.IdentityServiceLocal;
-import org.chorem.lima.business.ejbinterface.ImportService;
-import org.chorem.lima.business.ejbinterface.ImportServiceLocal;
-import org.chorem.lima.business.ejbinterface.VatStatementServiceLocal;
+import org.chorem.lima.business.api.AccountServiceLocal;
+import org.chorem.lima.business.api.EntryBookServiceLocal;
+import org.chorem.lima.business.api.FinancialPeriodServiceLocal;
+import org.chorem.lima.business.api.FinancialStatementServiceLocal;
+import org.chorem.lima.business.api.FinancialTransactionServiceLocal;
+import org.chorem.lima.business.api.FiscalPeriodServiceLocal;
+import org.chorem.lima.business.api.IdentityServiceLocal;
+import org.chorem.lima.business.api.ImportService;
+import org.chorem.lima.business.api.ImportServiceLocal;
+import org.chorem.lima.business.api.VatStatementServiceLocal;
import org.chorem.lima.business.utils.AccountEBPComparator;
import org.chorem.lima.business.utils.DocumentsEnum;
import org.chorem.lima.business.utils.EntryEBPComparator;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/OptionsServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -25,8 +25,8 @@
package org.chorem.lima.business.ejb;
import org.chorem.lima.business.LimaConfig;
-import org.chorem.lima.business.ejbinterface.OptionsService;
-import org.chorem.lima.business.ejbinterface.OptionsServiceLocal;
+import org.chorem.lima.business.api.OptionsService;
+import org.chorem.lima.business.api.OptionsServiceLocal;
import javax.ejb.Stateless;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ReportServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -31,10 +31,10 @@
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.beans.ReportsDatasImpl;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.AccountServiceLocal;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodServiceLocal;
-import org.chorem.lima.business.ejbinterface.ReportService;
-import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
+import org.chorem.lima.business.api.AccountServiceLocal;
+import org.chorem.lima.business.api.FinancialPeriodServiceLocal;
+import org.chorem.lima.business.api.ReportService;
+import org.chorem.lima.business.api.ReportServiceLocal;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.Entry;
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -33,9 +33,9 @@
import org.chorem.lima.beans.VatStatementDatas;
import org.chorem.lima.beans.VatStatementDatasImpl;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.ReportServiceLocal;
-import org.chorem.lima.business.ejbinterface.VatStatementService;
-import org.chorem.lima.business.ejbinterface.VatStatementServiceLocal;
+import org.chorem.lima.business.api.ReportServiceLocal;
+import org.chorem.lima.business.api.VatStatementService;
+import org.chorem.lima.business.api.VatStatementServiceLocal;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.LimaCallaoDAOHelper;
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,100 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * 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.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Account;
-
-import javax.ejb.Remote;
-import java.util.List;
-
-/**
- * Account service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Remote
-public interface AccountService {
-
- /**
- * Return account count.
- *
- * @return account count
- * @throws LimaException technical exception
- */
- long getAccountCount() throws LimaException;
-
- List<Account> getAllAccountByProperty(String propertyName,
- String value) throws LimaException;
-
- /**
- * Obtain the master account for the given account number.
- *
- * the master account if the account with the longer account number prefixing the given account number.
- *
- * Example: for account number 401AB, it could be 4, 40, 401,...
- *
- * @param accountNumber the account number
- * @return the master account number
- * @throws LimaException if any pb while loading account
- */
- Account getMasterAccount(String accountNumber) throws LimaException;
-
- Account getAccountByNumber(String number) throws LimaException;
-
- /**
- * Return all account ordered by account name.
- *
- * @return all account
- * @throws LimaException
- */
- List<Account> getAllAccounts() throws LimaException;
-
- List<Account> getAllLeafAccounts() throws LimaException;
-
- /**
- * Create new account. If {@code masterAccount} is not null, {@code account}
- * is added in {@code masterAccount}'s subAccounts.
- *
- * @param account account
- * @throws LimaException
- */
- Account createAccount(Account account) throws LimaException;
-
- Account updateAccount(Account account) throws LimaException;
-
- void removeAccount(Account account) throws LimaException;
-
- void removeAllAccount() throws LimaException;
-
- List<Account> getAllChildrenAccounts(Account masterAccount) throws LimaException;
-
- List<Account> getChildrenAccounts(Account masterAccount) throws LimaException;
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,48 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * 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.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Account;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-
-/**
- * Account service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Local
-public interface AccountServiceLocal extends AccountService {
-
- Account createAccountWithTransaction(Account account, TopiaContext topiaContext) throws LimaException;
-
-}
\ No newline at end of file
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,55 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.utils.FormatsEnum;
-
-import javax.ejb.Remote;
-import java.util.Date;
-
-/**
- * Interface to create pdf and html docs
- *
- * @author john
- */
-
-@Remote
-public interface DocumentService {
-
- void createFinancialStatementsDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
-
- void createLedgerDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
-
- void createEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
-
- void createBalanceDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
-
- void createGeneralEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
-
- void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete) throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,39 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Local;
-
-/**
- * Interface to create pdf and html docs
- *
- * @author john
- */
-
-@Local
-public interface DocumentServiceLocal extends DocumentService {
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,89 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * 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.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.EntryBook;
-
-import javax.ejb.Remote;
-import java.util.List;
-
-/**
- * Entry book service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Remote
-public interface EntryBookService {
-
- /**
- * Find entry book by code.
- *
- * @param code entry book code
- * @return
- * @throws LimaException
- */
- EntryBook getEntryBookByCode(String code) throws LimaException;
-
- /**
- * Get all entry book.
- *
- * @return all entrybook
- * @throws LimaException
- */
- List<EntryBook> getAllEntryBooks() throws LimaException;
-
- /**
- * Create new entry book.
- *
- * @param entryBook
- * @throws LimaException
- */
- EntryBook createEntryBook(EntryBook entryBook) throws LimaException;
-
- /**
- * Permet de modifier un journal.
- *
- * @param entryBook journal
- * @throws LimaException
- */
- EntryBook updateEntryBook(EntryBook entryBook) throws LimaException;
-
- /**
- * Permet d'effacer un EntryBook dans la base de données.
- * <p/>
- * ATTENTION : si un EntryBook est associé avec des entrées, il est alors
- * impossible de supprimer celui-ci.
- *
- * @param entryBook
- * @throws LimaException
- */
- void removeEntryBook(EntryBook entryBook) throws LimaException;
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,50 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.EntryBook;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-
-
-/**
- * Entry book service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-
-@Local
-public interface EntryBookServiceLocal extends EntryBookService {
-
- EntryBook createEntryBookWithTransaction(EntryBook entryBook, TopiaContext topiaContext) throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,74 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-
-import javax.ejb.Remote;
-
-/**
- * Import export service.
- * <p/>
- * Currently import and export as XML.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Remote
-public interface ExportService {
-
-
- /**
- * Get database export as CSV;
- *
- * @return export as byte array
- * @throws LimaException
- */
- String exportAsCSV() throws LimaException;
-
- /** export entrybook chart as CSV. */
- String exportEntryBookChartAsCSV() throws LimaException;
-
- /** export financialstatement chart as CSV. */
- String exportFinancialStatementChartAsCSV() throws LimaException;
-
- /** export vatstatement chart as CSV */
- String exportVatStatementChartAsCSV() throws LimaException;
-
- /** export accounts chart as CSV. */
- String exportAccountsChartAsCSV() throws LimaException;
-
- /** export entries as EBP */
- String exportEntriesAsEBP() throws LimaException;
-
- /** export accounts as EBP */
- String exportAccountsAsEBP() throws LimaException;
-
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,44 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Local;
-
-/**
- * Import export service.
- * <p/>
- * Currently import and export as XML.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Local
-public interface ExportServiceLocal extends ExportService {
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,65 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.ClosedPeriodicEntryBook;
-import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.FinancialPeriod;
-
-import javax.ejb.Remote;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Financial period service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-
-@Remote
-public interface FinancialPeriodService {
-
- List<FinancialPeriod> getUnblockedFinancialPeriods() throws LimaException;
-
- void createFinancialPeriods(List<FinancialPeriod> financialPeriods) throws LimaException;
-
- ClosedPeriodicEntryBook getClosedPeriodicEntryBook(EntryBook entryBook,
- FinancialPeriod financialPeriod) throws LimaException;
-
- List<ClosedPeriodicEntryBook> getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod() throws LimaException;
-
- void blockClosedPeriodicEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException;
-
- List<FinancialPeriod> getAllFinancialPeriods() throws LimaException;
-
- List<FinancialPeriod> getFinancialPeriods(Date beginDate,
- Date endDate) throws LimaException;
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,57 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.ClosedPeriodicEntryBook;
-import org.chorem.lima.entity.FinancialPeriod;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-import java.util.List;
-
-
-/**
- * Financial period service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-
-@Local
-public interface FinancialPeriodServiceLocal extends FinancialPeriodService {
-
- void createFinancialPeriodsWithTransaction(List<FinancialPeriod> financialPeriods,
- TopiaContext topiaContext) throws LimaException;
-
- void blockClosedPeriodicEntryBookWithTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook,
- TopiaContext topiaContext) throws LimaException;
-
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,61 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.beans.FinancialStatementAmounts;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.FinancialStatement;
-
-import javax.ejb.Remote;
-import java.util.Date;
-import java.util.List;
-
-@Remote
-public interface FinancialStatementService {
-
-
- void createFinancialStatement(FinancialStatement masterFinancialStatement,
- FinancialStatement financialStatement) throws LimaException;
-
- void updateFinancialStatement(FinancialStatement financialStatement) throws LimaException;
-
- void removeFinancialStatement(FinancialStatement financialStatement) throws LimaException;
-
- void removeAllFinancialStatement() throws LimaException;
-
- List<FinancialStatement> getAllFinancialStatements() throws LimaException;
-
- List<FinancialStatement> getChildrenFinancialStatement(FinancialStatement financialStatement) throws LimaException;
-
- List<FinancialStatement> getAllChildrenFinancialStatement(FinancialStatement financialStatement,
- List<FinancialStatement> financialStatements) throws LimaException;
-
- List<FinancialStatementAmounts> financialStatementReport(Date selectedBeginDate,
- Date selectedEndDate) throws LimaException;
-
- String checkFinancialStatementChart() throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,42 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.FinancialStatement;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-
-@Local
-public interface FinancialStatementServiceLocal extends FinancialStatementService {
-
- void createFinancialStatementWithTransaction(FinancialStatement masterFinancialStatement,
- FinancialStatement financialStatement,
- TopiaContext topiaContext) throws LimaException;
-
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,93 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.beans.FinancialTransactionSearch;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Entry;
-import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FinancialTransaction;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.entity.Letter;
-
-import javax.ejb.Remote;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Transaction service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-
-@Remote
-public interface FinancialTransactionService {
-
-
- FinancialTransaction createFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
-
- void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
-
- void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
-
- List<FinancialTransaction> getAllFinancialTransactionsForFinancialPeriod(FinancialPeriod period) throws LimaException;
-
- List<FinancialTransaction> getAllFinancialTransactionsFromDateToDate(Date beginDate,
- Date endDate) throws LimaException;
-
- List<FinancialTransaction> getAllFinancialTransactionsForEntryBookAndFinancialPeriod(EntryBook entryBook,
- FinancialPeriod period) throws LimaException;
-
- List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException;
-
- List<FinancialTransaction> getAllFinancialTransactionsBalanced(FiscalPeriod fiscalPeriod) throws LimaException;
-
- List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
-
- Entry createEntry(Entry entry) throws LimaException;
-
- void updateEntry(Entry entry) throws LimaException;
-
- void removeEntry(Entry entry) throws LimaException;
-
- Letter getNewLetter() throws LimaException;
-
- void createLetter(Letter letter) throws LimaException;
-
- void removeLetter(Letter letter) throws LimaException;
-
- List<Letter> getAllLetters() throws LimaException;
-
- void setEntryLetter(Entry entry, Letter letter) throws LimaException;
-
- void removeEntryLetter(Entry entry) throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,57 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Entry;
-import org.chorem.lima.entity.FinancialTransaction;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-
-/**
- * Transaction service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-
-@Local
-public interface FinancialTransactionServiceLocal extends FinancialTransactionService {
-
- FinancialTransaction createFinancialTransactionWithTransaction(FinancialTransaction financialtransaction,
- TopiaContext topiaContext) throws LimaException;
-
- void updateFinancialTransactionWithTransaction(FinancialTransaction financialtransaction,
- TopiaContext topiaContext) throws LimaException;
-
- Entry createEntryWithTransaction(Entry entry, TopiaContext topiaContext) throws LimaException;
-
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,62 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.FiscalPeriod;
-
-import javax.ejb.Remote;
-import java.util.List;
-
-/**
- * Fiscal period service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Remote
-public interface FiscalPeriodService {
-
- List<FiscalPeriod> getAllFiscalPeriods() throws LimaException;
-
- List<FiscalPeriod> getAllBlockedFiscalPeriods() throws LimaException;
-
- List<FiscalPeriod> getAllUnblockedFiscalPeriods() throws LimaException;
-
- FiscalPeriod getLastFiscalPeriod() throws LimaException;
-
- FiscalPeriod createFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
-
- FiscalPeriod blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
-
- void addRetainedEarnings(FiscalPeriod fiscalPeriod,
- boolean newyear,
- EntryBook entryBook) throws LimaException;
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,50 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-
-/**
- * Fiscal period service.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Local
-public interface FiscalPeriodServiceLocal extends FiscalPeriodService {
-
- FiscalPeriod createFiscalPeriodWithTransaction(FiscalPeriod fiscalPeriod,
- TopiaContext topiaContext) throws LimaException;
-
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,37 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface HttpServerService {
-
- void start();
-
- int getHttpPort();
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,33 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Local;
-
-@Local
-public interface HttpServerServiceLocal extends HttpServerService {
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,40 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Identity;
-
-import javax.ejb.Remote;
-
-@Remote
-public interface IdentityService {
-
- Identity getIdentity() throws LimaException;
-
- void updateIdentity(Identity identity) throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,42 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Identity;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-
-@Local
-public interface IdentityServiceLocal extends IdentityService {
-
- void updateIdentityWithTransaction(Identity identity,
- TopiaContext topiaContext) throws LimaException;
-
- Identity getIdentityWithTransaction(TopiaContext topiaContext) throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,87 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * 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.business.ejbinterface;
-
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.utils.ImportExportEntityEnum;
-
-import javax.ejb.Remote;
-
-/**
- * Import export service.
- * Currently import and export as CSV and EBP.
- */
-@Remote
-public interface ImportService {
-
- /**
- * Import accounts as EBP import.
- *
- * @param data import file content as string (remote service can't take File)
- * @return result log
- * @throws LimaException
- */
- String importAccountsChartFromEbp(String data) throws LimaException;
-
- /**
- * Import entries as EBP import.
- *
- * @param data import file content as string (remote service can't take File)
- * @return result log
- * @throws LimaException
- */
- String importEntriesFromEbp(String data) throws LimaException;
-
- /**
- * Import data as lima CSV import.
- *
- * Read first line to detect file type and call {@link #importAsCSV(String, ImportExportEntityEnum)}.
- *
- * @param data import file content as string (remote service can't take File)
- * @return result log
- * @throws LimaException
- */
- String importAllAsCSV(String data) throws LimaException;
-
- /**
- * Import content as CSV depending on import type.
- *
- * @param data import file content as string (remote service can't take File)
- * @param importExportEntityEnum import type
- * @return result log
- * @throws LimaException
- */
- String importAsCSV(String data,
- ImportExportEntityEnum importExportEntityEnum) throws LimaException;
-
- /**
- * @deprecated import file (local, can't be used in remote mode)
- * and wrong place for this method
- */
- String importAsPDF(String data,
- ImportExportEntityEnum importExportEntityEnum,
- boolean saveMode) throws LimaException;
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,44 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Local;
-
-/**
- * Import export service.
- * <p/>
- * Currently import and export as XML.
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-@Local
-public interface ImportServiceLocal extends ImportService {
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,57 +0,0 @@
-/*
- * #%L
- * Lima :: business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2011 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%
- */
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Remote;
-
-/**
- * Service de report des certaines configurations du swing dans business
- * <p/>
- * Actuellement :
- * <ul>
- * <li>scale</li>
- * </ul>
- *
- * @author salaun
- */
-
-@Remote
-public interface OptionsService {
-
- /**
- * Sets the swing scale to the business scale
- *
- * @param scale scale
- */
- void setScale(String scale);
-
- /**
- * Gets the business scale
- *
- * @return scale
- */
- int getScale();
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,32 +0,0 @@
-/*
- * #%L
- * Lima :: business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2011 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%
- */
-package org.chorem.lima.business.ejbinterface;
-
-import javax.ejb.Local;
-
-@Local
-public interface OptionsServiceLocal extends OptionsService {
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,150 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.beans.BalanceTrial;
-import org.chorem.lima.beans.ReportsDatas;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Account;
-import org.chorem.lima.entity.EntryBook;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Remote;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Service de generation des rapports.
- * <p/>
- * Actuellement:
- * <ul>
- * <li>Balance</li>
- * <li>Bilan</li>
- * <li>TVA</li>
- * </ul>
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-
-@Remote
-public interface ReportService {
-
- /**
- * Generation de la balance.
- *
- * @param beginDate
- * @param endDate
- * @param selectedAccounts
- * @param getEntries
- * @param movementedFilter
- * @return la balance
- * @throws LimaException
- */
- BalanceTrial generateBalanceTrial(Date beginDate,
- Date endDate,
- String selectedAccounts,
- Boolean getEntries,
- Boolean movementedFilter) throws LimaException;
-
- /**
- * Generation du grand-livre.
- *
- * @param beginDate
- * @param endDate
- * @param selectedAccounts
- * @param movementedFilter
- * @return
- * @throws LimaException
- */
- BalanceTrial generateLedger(Date beginDate,
- Date endDate,
- String selectedAccounts,
- Boolean movementedFilter) throws LimaException;
-
-
- /**
- * Generation du rapports des comptes.
- *
- * @param account
- * @param thirdPartAccountsMode
- * @param beginDate
- * @param endDate
- * @return
- * @throws LimaException
- */
- ReportsDatas generateAccountsReports(Account account,
- Boolean thirdPartAccountsMode,
- Date beginDate,
- Date endDate) throws LimaException;
-
-
- /**
- * Calculate all credit, debit and solde amounts for the balance.
- * <p/>
- * Get all entries if true
- *
- * @param account
- * @param beginDate
- * @param endDate
- * @param getEntries
- * @param topiaContext
- * @return
- * @throws LimaException
- */
- ReportsDatas generateSubAccountBalanceWithTransaction(Account account,
- Date beginDate,
- Date endDate,
- Boolean getEntries,
- TopiaContext topiaContext) throws LimaException;
-
- /**
- * Generation du rapports des journaux.
- *
- * @param entryBook
- * @param beginDate
- * @param endDate
- * @return
- * @throws LimaException
- */
- ReportsDatas generateEntryBooksReports(EntryBook entryBook,
- Date beginDate,
- Date endDate) throws LimaException;
-
- /**
- * Generate VAT.
- *
- * @param fiscalPeriod
- * @return
- * @throws LimaException
- */
- List<Object> generateVat(FiscalPeriod fiscalPeriod) throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,62 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.beans.ReportsDatas;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.Account;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-import java.util.Date;
-
-
-/**
- * Service de generation des rapports.
- * <p/>
- * Actuellement:
- * <ul>
- * <li>Balance</li>
- * <li>Bilan</li>
- * </ul>
- *
- * @author chatellier
- * @version $Revision$
- * <p/>
- * Last update : $Date$
- * By : $Author$
- */
-
-@Local
-public interface ReportServiceLocal extends ReportService {
-
- ReportsDatas generateAccountReportsWithTransaction(Account account,
- Boolean thirdPartAccountsMode,
- Date beginDate,
- Date endDate,
- TopiaContext topiaContext) throws LimaException;
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,64 +0,0 @@
-/*
- * #%L
- * Lima :: business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2011 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%
- */
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.beans.VatStatementAmounts;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.VatStatement;
-
-import javax.ejb.Remote;
-import java.util.Date;
-import java.util.List;
-
-@Remote
-public interface VatStatementService {
-
- void createVatStatement(VatStatement masterVatStatement,
- VatStatement vatStatement) throws LimaException;
-
- List<VatStatement> getAllVatStatements() throws LimaException;
-
- List<VatStatement> getAllChildrenVatStatement(VatStatement vatStatement,
- List<VatStatement> result) throws LimaException;
-
- List<VatStatement> getChildrenVatStatement(VatStatement masterVatStatement) throws LimaException;
-
- void updateVatStatement(VatStatement vatStatement) throws LimaException;
-
- VatStatementAmounts vatStatementAmounts(VatStatement vatStatement,
- Date selectedBeginDate,
- Date selectedEndDate) throws LimaException;
-
- VatStatement findVatStatementByString(String label) throws LimaException;
-
- List<VatStatementAmounts> vatStatementReport(Date beginDate,
- Date endDate) throws LimaException;
-
- void removeAllVatStatement() throws LimaException;
-
- void removeVatStatement(VatStatement vatStatement) throws LimaException;
-
-
-}
\ No newline at end of file
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,54 +0,0 @@
-/*
- * #%L
- * Lima :: business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2011 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%
- */
-package org.chorem.lima.business.ejbinterface;
-
-import org.chorem.lima.beans.VatStatementAmounts;
-import org.chorem.lima.beans.VatStatementDatas;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.entity.VatStatement;
-import org.nuiton.topia.TopiaContext;
-
-import javax.ejb.Local;
-import java.util.Date;
-
-@Local
-public interface VatStatementServiceLocal extends VatStatementService {
-
- void createVatStatementWithTransaction(
- VatStatement masterVatStatement, VatStatement vatStatement,
- TopiaContext transaction) throws LimaException;
-
- VatStatementAmounts vatStatementAmounts(VatStatement vatStatement,
- Date selectedBeginDate,
- Date selectedEndDate,
- TopiaContext topiacontext) throws LimaException;
-
- VatStatementDatas vatStatementReport(VatStatement vatStatement,
- Date selectedBeginDate,
- Date selectedEndDate,
- VatStatementDatas result,
- TopiaContext topiaContext) throws LimaException;
-
-}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/AccountServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/AccountServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/AccountServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.AccountService;
+import org.chorem.lima.business.api.AccountService;
public interface AccountServiceMonitorable extends AccountService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/DocumentServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/DocumentServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/DocumentServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.DocumentService;
+import org.chorem.lima.business.api.DocumentService;
public interface DocumentServiceMonitorable extends DocumentService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/EntryBookServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/EntryBookServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/EntryBookServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.EntryBookService;
+import org.chorem.lima.business.api.EntryBookService;
public interface EntryBookServiceMonitorable extends EntryBookService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ExportServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ExportServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ExportServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.ExportService;
+import org.chorem.lima.business.api.ExportService;
public interface ExportServiceMonitorable extends ExportService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialPeriodServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialPeriodServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialPeriodServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodService;
+import org.chorem.lima.business.api.FinancialPeriodService;
public interface FinancialPeriodServiceMonitorable extends FinancialPeriodService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialStatementServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialStatementServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialStatementServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.FinancialStatementService;
+import org.chorem.lima.business.api.FinancialStatementService;
public interface FinancialStatementServiceMonitorable extends FinancialStatementService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialTransactionServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialTransactionServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FinancialTransactionServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+import org.chorem.lima.business.api.FinancialTransactionService;
public interface FinancialTransactionServiceMonitorable extends FinancialTransactionService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FiscalPeriodServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FiscalPeriodServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/FiscalPeriodServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
+import org.chorem.lima.business.api.FiscalPeriodService;
public interface FiscalPeriodServiceMonitorable extends FiscalPeriodService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/HttpServerServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/HttpServerServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/HttpServerServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.HttpServerService;
+import org.chorem.lima.business.api.HttpServerService;
public interface HttpServerServiceMonitorable extends HttpServerService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/IdentityServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/IdentityServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/IdentityServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.IdentityService;
+import org.chorem.lima.business.api.IdentityService;
public interface IdentityServiceMonitorable extends IdentityService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ImportServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ImportServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ImportServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.ImportService;
+import org.chorem.lima.business.api.ImportService;
public interface ImportServiceMonitorable extends ImportService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/OptionsServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/OptionsServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/OptionsServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -22,11 +22,11 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
-package org.chorem.lima.business.monitorable;
-
+package org.chorem.lima.business.monitorable;
+
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.OptionsService;
-
-public interface OptionsServiceMonitorable extends OptionsService, ServiceMonitorable {
-
-}
+import org.chorem.lima.business.api.OptionsService;
+
+public interface OptionsServiceMonitorable extends OptionsService, ServiceMonitorable {
+
+}
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ReportServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ReportServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/ReportServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -26,7 +26,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.ReportService;
+import org.chorem.lima.business.api.ReportService;
public interface ReportServiceMonitorable extends ReportService, ServiceMonitorable {
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/VatStatementServiceMonitorable.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/VatStatementServiceMonitorable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/monitorable/VatStatementServiceMonitorable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -25,7 +25,7 @@
package org.chorem.lima.business.monitorable;
import org.chorem.lima.business.ServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.VatStatementService;
+import org.chorem.lima.business.api.VatStatementService;
public interface VatStatementServiceMonitorable extends VatStatementService, ServiceMonitorable {
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,70 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.utils;
-
-public enum FormatsEnum {
-
- HTML(".html", "text/html", "Page Html"),
- PDF(".pdf", "application/pdf", "Document PDF");
-
- private final String extension;
-
- private final String mimeType;
-
- private final String description;
-
- private FormatsEnum(String extension, String mimeType, String description) {
- this.extension = extension;
- this.mimeType = mimeType;
- this.description = description;
- }
-
- public String getExtension() {
- return extension;
- }
-
- public String getMimeType() {
- return mimeType;
- }
-
- public String getDescription() {
- return description;
- }
-
- public static FormatsEnum valueOfExtension(String extension) {
- FormatsEnum value = null;
-
- for (FormatsEnum formatsEnum : FormatsEnum.values()) {
- if (extension.equals(formatsEnum.getExtension())) {
- value = formatsEnum;
- break;
- }
- }
- return value;
- }
-
-
-}
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -1,64 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 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%
- */
-
-package org.chorem.lima.business.utils;
-
-public enum ImportExportEntityEnum {
-
- ACCOUNT("ACCN"),
- ENTRYBOOK("ENBK"),
- FINANCIALSTATEMENT("FNST"),
- FISCALPERIOD("FSCP"),
- CLOSEDPERIODICENTRYBOOK("CPEB"),
- FINANCIALTRANSACTION("FTRC"),
- ENTRY("NTRY"),
- VATSTATEMENT("VAT"),
- IDENTITY("IDNT"),
- VATPDF("VATPDF");
-
- private final String label;
-
- ImportExportEntityEnum(String label) {
- this.label = label;
- }
-
- public String getLabel() {
- return label;
- }
-
- public static ImportExportEntityEnum valueOfLabel(String label) {
- ImportExportEntityEnum value = null;
-
- for (ImportExportEntityEnum importExportEntityEnum : ImportExportEntityEnum.values()) {
- if (label.equals(importExportEntityEnum.label)) {
- value = importExportEntityEnum;
- break;
- }
- }
- return value;
- }
-}
-
-
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/AbstractLimaTest.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -40,13 +40,13 @@
import org.chorem.lima.business.accountingrules.TestAccountingRules;
import org.chorem.lima.business.ejb.ClearService;
import org.chorem.lima.business.ejb.ClearServiceMonitorable;
-import org.chorem.lima.business.ejbinterface.AccountService;
-import org.chorem.lima.business.ejbinterface.EntryBookService;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodService;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
-import org.chorem.lima.business.ejbinterface.ImportService;
-import org.chorem.lima.business.ejbinterface.ReportService;
+import org.chorem.lima.business.api.AccountService;
+import org.chorem.lima.business.api.EntryBookService;
+import org.chorem.lima.business.api.FinancialPeriodService;
+import org.chorem.lima.business.api.FinancialTransactionService;
+import org.chorem.lima.business.api.FiscalPeriodService;
+import org.chorem.lima.business.api.ImportService;
+import org.chorem.lima.business.api.ReportService;
import org.chorem.lima.business.monitorable.AccountServiceMonitorable;
import org.chorem.lima.business.monitorable.EntryBookServiceMonitorable;
import org.chorem.lima.business.monitorable.FinancialPeriodServiceMonitorable;
Property changes on: trunk/lima-business-api
___________________________________________________________________
Added: svn:ignore
+ target
.idea
.classpath
.project
.settigns
*.ipr
*.iws
*.iml
Added: trunk/lima-business-api/pom.xml
===================================================================
--- trunk/lima-business-api/pom.xml (rev 0)
+++ trunk/lima-business-api/pom.xml 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,51 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+ <parent>
+ <groupId>org.chorem</groupId>
+ <artifactId>lima</artifactId>
+ <version>0.6-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.chorem.lima</groupId>
+ <artifactId>lima-business-api</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>lima-callao</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+ <name>Lima :: business API</name>
+ <description>Business API module for lima</description>
+
+ <properties>
+ </properties>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <build>
+ </build>
+
+ <profiles>
+ </profiles>
+
+</project>
+
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/LimaException.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,60 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business;
+
+/**
+ * Lima exception.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class LimaException extends Exception {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = -6876236663940184462L;
+
+ /**
+ * Constructs a new exception with the specified detail message.
+ *
+ * @param message message
+ */
+ public LimaException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a new exception with the specified detail message and cause.
+ *
+ * @param message message
+ * @param cause cause
+ */
+ public LimaException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,100 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Account;
+
+import javax.ejb.Remote;
+import java.util.List;
+
+/**
+ * Account service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Remote
+public interface AccountService {
+
+ /**
+ * Return account count.
+ *
+ * @return account count
+ * @throws LimaException technical exception
+ */
+ long getAccountCount() throws LimaException;
+
+ List<Account> getAllAccountByProperty(String propertyName,
+ String value) throws LimaException;
+
+ /**
+ * Obtain the master account for the given account number.
+ *
+ * the master account if the account with the longer account number prefixing the given account number.
+ *
+ * Example: for account number 401AB, it could be 4, 40, 401,...
+ *
+ * @param accountNumber the account number
+ * @return the master account number
+ * @throws LimaException if any pb while loading account
+ */
+ Account getMasterAccount(String accountNumber) throws LimaException;
+
+ Account getAccountByNumber(String number) throws LimaException;
+
+ /**
+ * Return all account ordered by account name.
+ *
+ * @return all account
+ * @throws LimaException
+ */
+ List<Account> getAllAccounts() throws LimaException;
+
+ List<Account> getAllLeafAccounts() throws LimaException;
+
+ /**
+ * Create new account. If {@code masterAccount} is not null, {@code account}
+ * is added in {@code masterAccount}'s subAccounts.
+ *
+ * @param account account
+ * @throws LimaException
+ */
+ Account createAccount(Account account) throws LimaException;
+
+ Account updateAccount(Account account) throws LimaException;
+
+ void removeAccount(Account account) throws LimaException;
+
+ void removeAllAccount() throws LimaException;
+
+ List<Account> getAllChildrenAccounts(Account masterAccount) throws LimaException;
+
+ List<Account> getChildrenAccounts(Account masterAccount) throws LimaException;
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/AccountServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,48 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Account;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+
+/**
+ * Account service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Local
+public interface AccountServiceLocal extends AccountService {
+
+ Account createAccountWithTransaction(Account account, TopiaContext topiaContext) throws LimaException;
+
+}
\ No newline at end of file
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,55 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.utils.FormatsEnum;
+
+import javax.ejb.Remote;
+import java.util.Date;
+
+/**
+ * Interface to create pdf and html docs
+ *
+ * @author john
+ */
+
+@Remote
+public interface DocumentService {
+
+ void createFinancialStatementsDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+
+ void createLedgerDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+
+ void createEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+
+ void createBalanceDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+
+ void createGeneralEntryBooksDocuments(Date beginDate, Date endDate, FormatsEnum format) throws LimaException;
+
+ void createVatDocuments(Date beginDate, Date endDate, FormatsEnum format, String autocomplete) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/DocumentServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/DocumentServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,39 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import javax.ejb.Local;
+
+/**
+ * Interface to create pdf and html docs
+ *
+ * @author john
+ */
+
+@Local
+public interface DocumentServiceLocal extends DocumentService {
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,89 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.EntryBook;
+
+import javax.ejb.Remote;
+import java.util.List;
+
+/**
+ * Entry book service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Remote
+public interface EntryBookService {
+
+ /**
+ * Find entry book by code.
+ *
+ * @param code entry book code
+ * @return
+ * @throws LimaException
+ */
+ EntryBook getEntryBookByCode(String code) throws LimaException;
+
+ /**
+ * Get all entry book.
+ *
+ * @return all entrybook
+ * @throws LimaException
+ */
+ List<EntryBook> getAllEntryBooks() throws LimaException;
+
+ /**
+ * Create new entry book.
+ *
+ * @param entryBook
+ * @throws LimaException
+ */
+ EntryBook createEntryBook(EntryBook entryBook) throws LimaException;
+
+ /**
+ * Permet de modifier un journal.
+ *
+ * @param entryBook journal
+ * @throws LimaException
+ */
+ EntryBook updateEntryBook(EntryBook entryBook) throws LimaException;
+
+ /**
+ * Permet d'effacer un EntryBook dans la base de données.
+ * <p/>
+ * ATTENTION : si un EntryBook est associé avec des entrées, il est alors
+ * impossible de supprimer celui-ci.
+ *
+ * @param entryBook
+ * @throws LimaException
+ */
+ void removeEntryBook(EntryBook entryBook) throws LimaException;
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/EntryBookServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/EntryBookServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,50 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.EntryBook;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+
+
+/**
+ * Entry book service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+
+@Local
+public interface EntryBookServiceLocal extends EntryBookService {
+
+ EntryBook createEntryBookWithTransaction(EntryBook entryBook, TopiaContext topiaContext) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,74 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+
+import javax.ejb.Remote;
+
+/**
+ * Import export service.
+ * <p/>
+ * Currently import and export as XML.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Remote
+public interface ExportService {
+
+
+ /**
+ * Get database export as CSV;
+ *
+ * @return export as byte array
+ * @throws LimaException
+ */
+ String exportAsCSV() throws LimaException;
+
+ /** export entrybook chart as CSV. */
+ String exportEntryBookChartAsCSV() throws LimaException;
+
+ /** export financialstatement chart as CSV. */
+ String exportFinancialStatementChartAsCSV() throws LimaException;
+
+ /** export vatstatement chart as CSV */
+ String exportVatStatementChartAsCSV() throws LimaException;
+
+ /** export accounts chart as CSV. */
+ String exportAccountsChartAsCSV() throws LimaException;
+
+ /** export entries as EBP */
+ String exportEntriesAsEBP() throws LimaException;
+
+ /** export accounts as EBP */
+ String exportAccountsAsEBP() throws LimaException;
+
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ExportServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ExportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,44 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import javax.ejb.Local;
+
+/**
+ * Import export service.
+ * <p/>
+ * Currently import and export as XML.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Local
+public interface ExportServiceLocal extends ExportService {
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,65 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.ClosedPeriodicEntryBook;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+
+import javax.ejb.Remote;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Financial period service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+
+@Remote
+public interface FinancialPeriodService {
+
+ List<FinancialPeriod> getUnblockedFinancialPeriods() throws LimaException;
+
+ void createFinancialPeriods(List<FinancialPeriod> financialPeriods) throws LimaException;
+
+ ClosedPeriodicEntryBook getClosedPeriodicEntryBook(EntryBook entryBook,
+ FinancialPeriod financialPeriod) throws LimaException;
+
+ List<ClosedPeriodicEntryBook> getAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod() throws LimaException;
+
+ void blockClosedPeriodicEntryBook(ClosedPeriodicEntryBook closedPeriodicEntryBook) throws LimaException;
+
+ List<FinancialPeriod> getAllFinancialPeriods() throws LimaException;
+
+ List<FinancialPeriod> getFinancialPeriods(Date beginDate,
+ Date endDate) throws LimaException;
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialPeriodServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialPeriodServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,57 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.ClosedPeriodicEntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+import java.util.List;
+
+
+/**
+ * Financial period service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+
+@Local
+public interface FinancialPeriodServiceLocal extends FinancialPeriodService {
+
+ void createFinancialPeriodsWithTransaction(List<FinancialPeriod> financialPeriods,
+ TopiaContext topiaContext) throws LimaException;
+
+ void blockClosedPeriodicEntryBookWithTransaction(ClosedPeriodicEntryBook closedPeriodicEntryBook,
+ TopiaContext topiaContext) throws LimaException;
+
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,61 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.beans.FinancialStatementAmounts;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.FinancialStatement;
+
+import javax.ejb.Remote;
+import java.util.Date;
+import java.util.List;
+
+@Remote
+public interface FinancialStatementService {
+
+
+ void createFinancialStatement(FinancialStatement masterFinancialStatement,
+ FinancialStatement financialStatement) throws LimaException;
+
+ void updateFinancialStatement(FinancialStatement financialStatement) throws LimaException;
+
+ void removeFinancialStatement(FinancialStatement financialStatement) throws LimaException;
+
+ void removeAllFinancialStatement() throws LimaException;
+
+ List<FinancialStatement> getAllFinancialStatements() throws LimaException;
+
+ List<FinancialStatement> getChildrenFinancialStatement(FinancialStatement financialStatement) throws LimaException;
+
+ List<FinancialStatement> getAllChildrenFinancialStatement(FinancialStatement financialStatement,
+ List<FinancialStatement> financialStatements) throws LimaException;
+
+ List<FinancialStatementAmounts> financialStatementReport(Date selectedBeginDate,
+ Date selectedEndDate) throws LimaException;
+
+ String checkFinancialStatementChart() throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialStatementServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialStatementServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,42 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.FinancialStatement;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+
+@Local
+public interface FinancialStatementServiceLocal extends FinancialStatementService {
+
+ void createFinancialStatementWithTransaction(FinancialStatement masterFinancialStatement,
+ FinancialStatement financialStatement,
+ TopiaContext topiaContext) throws LimaException;
+
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,93 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.beans.FinancialTransactionSearch;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Entry;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FinancialTransaction;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.entity.Letter;
+
+import javax.ejb.Remote;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Transaction service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+
+@Remote
+public interface FinancialTransactionService {
+
+
+ FinancialTransaction createFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
+ void updateFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
+ void removeFinancialTransaction(FinancialTransaction financialtransaction) throws LimaException;
+
+ List<FinancialTransaction> getAllFinancialTransactionsForFinancialPeriod(FinancialPeriod period) throws LimaException;
+
+ List<FinancialTransaction> getAllFinancialTransactionsFromDateToDate(Date beginDate,
+ Date endDate) throws LimaException;
+
+ List<FinancialTransaction> getAllFinancialTransactionsForEntryBookAndFinancialPeriod(EntryBook entryBook,
+ FinancialPeriod period) throws LimaException;
+
+ List<FinancialTransaction> getAllInexactFinancialTransactions(FiscalPeriod fiscalPeriod) throws LimaException;
+
+ List<FinancialTransaction> getAllFinancialTransactionsBalanced(FiscalPeriod fiscalPeriod) throws LimaException;
+
+ List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException;
+
+ Entry createEntry(Entry entry) throws LimaException;
+
+ void updateEntry(Entry entry) throws LimaException;
+
+ void removeEntry(Entry entry) throws LimaException;
+
+ Letter getNewLetter() throws LimaException;
+
+ void createLetter(Letter letter) throws LimaException;
+
+ void removeLetter(Letter letter) throws LimaException;
+
+ List<Letter> getAllLetters() throws LimaException;
+
+ void setEntryLetter(Entry entry, Letter letter) throws LimaException;
+
+ void removeEntryLetter(Entry entry) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FinancialTransactionServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FinancialTransactionServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,57 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Entry;
+import org.chorem.lima.entity.FinancialTransaction;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+
+/**
+ * Transaction service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+
+@Local
+public interface FinancialTransactionServiceLocal extends FinancialTransactionService {
+
+ FinancialTransaction createFinancialTransactionWithTransaction(FinancialTransaction financialtransaction,
+ TopiaContext topiaContext) throws LimaException;
+
+ void updateFinancialTransactionWithTransaction(FinancialTransaction financialtransaction,
+ TopiaContext topiaContext) throws LimaException;
+
+ Entry createEntryWithTransaction(Entry entry, TopiaContext topiaContext) throws LimaException;
+
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,62 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FiscalPeriod;
+
+import javax.ejb.Remote;
+import java.util.List;
+
+/**
+ * Fiscal period service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Remote
+public interface FiscalPeriodService {
+
+ List<FiscalPeriod> getAllFiscalPeriods() throws LimaException;
+
+ List<FiscalPeriod> getAllBlockedFiscalPeriods() throws LimaException;
+
+ List<FiscalPeriod> getAllUnblockedFiscalPeriods() throws LimaException;
+
+ FiscalPeriod getLastFiscalPeriod() throws LimaException;
+
+ FiscalPeriod createFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
+
+ FiscalPeriod blockFiscalPeriod(FiscalPeriod fiscalPeriod) throws LimaException;
+
+ void addRetainedEarnings(FiscalPeriod fiscalPeriod,
+ boolean newyear,
+ EntryBook entryBook) throws LimaException;
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/FiscalPeriodServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/FiscalPeriodServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,50 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+
+/**
+ * Fiscal period service.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Local
+public interface FiscalPeriodServiceLocal extends FiscalPeriodService {
+
+ FiscalPeriod createFiscalPeriodWithTransaction(FiscalPeriod fiscalPeriod,
+ TopiaContext topiaContext) throws LimaException;
+
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,37 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface HttpServerService {
+
+ void start();
+
+ int getHttpPort();
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/HttpServerServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/HttpServerServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,33 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import javax.ejb.Local;
+
+@Local
+public interface HttpServerServiceLocal extends HttpServerService {
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,40 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Identity;
+
+import javax.ejb.Remote;
+
+@Remote
+public interface IdentityService {
+
+ Identity getIdentity() throws LimaException;
+
+ void updateIdentity(Identity identity) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/IdentityServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/IdentityServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,42 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Identity;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+
+@Local
+public interface IdentityServiceLocal extends IdentityService {
+
+ void updateIdentityWithTransaction(Identity identity,
+ TopiaContext topiaContext) throws LimaException;
+
+ Identity getIdentityWithTransaction(TopiaContext topiaContext) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,87 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * 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.business.api;
+
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.business.utils.ImportExportEntityEnum;
+
+import javax.ejb.Remote;
+
+/**
+ * Import export service.
+ * Currently import and export as CSV and EBP.
+ */
+@Remote
+public interface ImportService {
+
+ /**
+ * Import accounts as EBP import.
+ *
+ * @param data import file content as string (remote service can't take File)
+ * @return result log
+ * @throws LimaException
+ */
+ String importAccountsChartFromEbp(String data) throws LimaException;
+
+ /**
+ * Import entries as EBP import.
+ *
+ * @param data import file content as string (remote service can't take File)
+ * @return result log
+ * @throws LimaException
+ */
+ String importEntriesFromEbp(String data) throws LimaException;
+
+ /**
+ * Import data as lima CSV import.
+ *
+ * Read first line to detect file type and call {@link #importAsCSV(String, ImportExportEntityEnum)}.
+ *
+ * @param data import file content as string (remote service can't take File)
+ * @return result log
+ * @throws LimaException
+ */
+ String importAllAsCSV(String data) throws LimaException;
+
+ /**
+ * Import content as CSV depending on import type.
+ *
+ * @param data import file content as string (remote service can't take File)
+ * @param importExportEntityEnum import type
+ * @return result log
+ * @throws LimaException
+ */
+ String importAsCSV(String data,
+ ImportExportEntityEnum importExportEntityEnum) throws LimaException;
+
+ /**
+ * @deprecated import file (local, can't be used in remote mode)
+ * and wrong place for this method
+ */
+ String importAsPDF(String data,
+ ImportExportEntityEnum importExportEntityEnum,
+ boolean saveMode) throws LimaException;
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ImportServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ImportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,44 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import javax.ejb.Local;
+
+/**
+ * Import export service.
+ * <p/>
+ * Currently import and export as XML.
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+@Local
+public interface ImportServiceLocal extends ImportService {
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,57 @@
+/*
+ * #%L
+ * Lima :: business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2011 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%
+ */
+package org.chorem.lima.business.api;
+
+import javax.ejb.Remote;
+
+/**
+ * Service de report des certaines configurations du swing dans business
+ * <p/>
+ * Actuellement :
+ * <ul>
+ * <li>scale</li>
+ * </ul>
+ *
+ * @author salaun
+ */
+
+@Remote
+public interface OptionsService {
+
+ /**
+ * Sets the swing scale to the business scale
+ *
+ * @param scale scale
+ */
+ void setScale(String scale);
+
+ /**
+ * Gets the business scale
+ *
+ * @return scale
+ */
+ int getScale();
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/OptionsServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/OptionsServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,32 @@
+/*
+ * #%L
+ * Lima :: business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2011 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%
+ */
+package org.chorem.lima.business.api;
+
+import javax.ejb.Local;
+
+@Local
+public interface OptionsServiceLocal extends OptionsService {
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,150 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.beans.BalanceTrial;
+import org.chorem.lima.beans.ReportsDatas;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Account;
+import org.chorem.lima.entity.EntryBook;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Remote;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Service de generation des rapports.
+ * <p/>
+ * Actuellement:
+ * <ul>
+ * <li>Balance</li>
+ * <li>Bilan</li>
+ * <li>TVA</li>
+ * </ul>
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+
+@Remote
+public interface ReportService {
+
+ /**
+ * Generation de la balance.
+ *
+ * @param beginDate
+ * @param endDate
+ * @param selectedAccounts
+ * @param getEntries
+ * @param movementedFilter
+ * @return la balance
+ * @throws LimaException
+ */
+ BalanceTrial generateBalanceTrial(Date beginDate,
+ Date endDate,
+ String selectedAccounts,
+ Boolean getEntries,
+ Boolean movementedFilter) throws LimaException;
+
+ /**
+ * Generation du grand-livre.
+ *
+ * @param beginDate
+ * @param endDate
+ * @param selectedAccounts
+ * @param movementedFilter
+ * @return
+ * @throws LimaException
+ */
+ BalanceTrial generateLedger(Date beginDate,
+ Date endDate,
+ String selectedAccounts,
+ Boolean movementedFilter) throws LimaException;
+
+
+ /**
+ * Generation du rapports des comptes.
+ *
+ * @param account
+ * @param thirdPartAccountsMode
+ * @param beginDate
+ * @param endDate
+ * @return
+ * @throws LimaException
+ */
+ ReportsDatas generateAccountsReports(Account account,
+ Boolean thirdPartAccountsMode,
+ Date beginDate,
+ Date endDate) throws LimaException;
+
+
+ /**
+ * Calculate all credit, debit and solde amounts for the balance.
+ * <p/>
+ * Get all entries if true
+ *
+ * @param account
+ * @param beginDate
+ * @param endDate
+ * @param getEntries
+ * @param topiaContext
+ * @return
+ * @throws LimaException
+ */
+ ReportsDatas generateSubAccountBalanceWithTransaction(Account account,
+ Date beginDate,
+ Date endDate,
+ Boolean getEntries,
+ TopiaContext topiaContext) throws LimaException;
+
+ /**
+ * Generation du rapports des journaux.
+ *
+ * @param entryBook
+ * @param beginDate
+ * @param endDate
+ * @return
+ * @throws LimaException
+ */
+ ReportsDatas generateEntryBooksReports(EntryBook entryBook,
+ Date beginDate,
+ Date endDate) throws LimaException;
+
+ /**
+ * Generate VAT.
+ *
+ * @param fiscalPeriod
+ * @return
+ * @throws LimaException
+ */
+ List<Object> generateVat(FiscalPeriod fiscalPeriod) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/ReportServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/ReportServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,62 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.beans.ReportsDatas;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.Account;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+import java.util.Date;
+
+
+/**
+ * Service de generation des rapports.
+ * <p/>
+ * Actuellement:
+ * <ul>
+ * <li>Balance</li>
+ * <li>Bilan</li>
+ * </ul>
+ *
+ * @author chatellier
+ * @version $Revision$
+ * <p/>
+ * Last update : $Date$
+ * By : $Author$
+ */
+
+@Local
+public interface ReportServiceLocal extends ReportService {
+
+ ReportsDatas generateAccountReportsWithTransaction(Account account,
+ Boolean thirdPartAccountsMode,
+ Date beginDate,
+ Date endDate,
+ TopiaContext topiaContext) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementService.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementService.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,64 @@
+/*
+ * #%L
+ * Lima :: business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2011 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%
+ */
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.beans.VatStatementAmounts;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.VatStatement;
+
+import javax.ejb.Remote;
+import java.util.Date;
+import java.util.List;
+
+@Remote
+public interface VatStatementService {
+
+ void createVatStatement(VatStatement masterVatStatement,
+ VatStatement vatStatement) throws LimaException;
+
+ List<VatStatement> getAllVatStatements() throws LimaException;
+
+ List<VatStatement> getAllChildrenVatStatement(VatStatement vatStatement,
+ List<VatStatement> result) throws LimaException;
+
+ List<VatStatement> getChildrenVatStatement(VatStatement masterVatStatement) throws LimaException;
+
+ void updateVatStatement(VatStatement vatStatement) throws LimaException;
+
+ VatStatementAmounts vatStatementAmounts(VatStatement vatStatement,
+ Date selectedBeginDate,
+ Date selectedEndDate) throws LimaException;
+
+ VatStatement findVatStatementByString(String label) throws LimaException;
+
+ List<VatStatementAmounts> vatStatementReport(Date beginDate,
+ Date endDate) throws LimaException;
+
+ void removeAllVatStatement() throws LimaException;
+
+ void removeVatStatement(VatStatement vatStatement) throws LimaException;
+
+
+}
\ No newline at end of file
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/ejbinterface/VatStatementServiceLocal.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/VatStatementServiceLocal.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,54 @@
+/*
+ * #%L
+ * Lima :: business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2011 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%
+ */
+package org.chorem.lima.business.api;
+
+import org.chorem.lima.beans.VatStatementAmounts;
+import org.chorem.lima.beans.VatStatementDatas;
+import org.chorem.lima.business.LimaException;
+import org.chorem.lima.entity.VatStatement;
+import org.nuiton.topia.TopiaContext;
+
+import javax.ejb.Local;
+import java.util.Date;
+
+@Local
+public interface VatStatementServiceLocal extends VatStatementService {
+
+ void createVatStatementWithTransaction(
+ VatStatement masterVatStatement, VatStatement vatStatement,
+ TopiaContext transaction) throws LimaException;
+
+ VatStatementAmounts vatStatementAmounts(VatStatement vatStatement,
+ Date selectedBeginDate,
+ Date selectedEndDate,
+ TopiaContext topiacontext) throws LimaException;
+
+ VatStatementDatas vatStatementReport(VatStatement vatStatement,
+ Date selectedBeginDate,
+ Date selectedEndDate,
+ VatStatementDatas result,
+ TopiaContext topiaContext) throws LimaException;
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/FormatsEnum.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,70 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.utils;
+
+public enum FormatsEnum {
+
+ HTML(".html", "text/html", "Page Html"),
+ PDF(".pdf", "application/pdf", "Document PDF");
+
+ private final String extension;
+
+ private final String mimeType;
+
+ private final String description;
+
+ private FormatsEnum(String extension, String mimeType, String description) {
+ this.extension = extension;
+ this.mimeType = mimeType;
+ this.description = description;
+ }
+
+ public String getExtension() {
+ return extension;
+ }
+
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public static FormatsEnum valueOfExtension(String extension) {
+ FormatsEnum value = null;
+
+ for (FormatsEnum formatsEnum : FormatsEnum.values()) {
+ if (extension.equals(formatsEnum.getExtension())) {
+ value = formatsEnum;
+ break;
+ }
+ }
+ return value;
+ }
+
+
+}
Copied: trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java (from rev 3358, trunk/lima-business/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java)
===================================================================
--- trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java (rev 0)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/utils/ImportExportEntityEnum.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -0,0 +1,64 @@
+/*
+ * #%L
+ * Lima business
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 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%
+ */
+
+package org.chorem.lima.business.utils;
+
+public enum ImportExportEntityEnum {
+
+ ACCOUNT("ACCN"),
+ ENTRYBOOK("ENBK"),
+ FINANCIALSTATEMENT("FNST"),
+ FISCALPERIOD("FSCP"),
+ CLOSEDPERIODICENTRYBOOK("CPEB"),
+ FINANCIALTRANSACTION("FTRC"),
+ ENTRY("NTRY"),
+ VATSTATEMENT("VAT"),
+ IDENTITY("IDNT"),
+ VATPDF("VATPDF");
+
+ private final String label;
+
+ ImportExportEntityEnum(String label) {
+ this.label = label;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public static ImportExportEntityEnum valueOfLabel(String label) {
+ ImportExportEntityEnum value = null;
+
+ for (ImportExportEntityEnum importExportEntityEnum : ImportExportEntityEnum.values()) {
+ if (label.equals(importExportEntityEnum.label)) {
+ value = importExportEntityEnum;
+ break;
+ }
+ }
+ return value;
+ }
+}
+
+
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaMain.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -28,7 +28,7 @@
import jaxx.runtime.SwingUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.ejbinterface.AccountService;
+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.service.LimaServiceFactory;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -49,7 +49,7 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.AccountService;
+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.entity.Account;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountComboBoxModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.AccountService;
+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.entity.Account;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/EntryBookComboBoxModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.EntryBookService;
+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.entity.EntryBook;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FinancialPeriodComboBoxModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodService;
+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;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/FiscalPeriodComboBoxModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
+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.entity.FiscalPeriod;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/LetterComboBoxModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+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.entity.Letter;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/SubAccountComboBoxModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.AccountService;
+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.entity.Account;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -36,7 +36,7 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.EntryBookService;
+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.entity.EntryBook;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTable.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -28,7 +28,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodService;
+import org.chorem.lima.business.api.FinancialPeriodService;
import org.chorem.lima.business.monitorable.FinancialPeriodServiceMonitorable;
import org.chorem.lima.entity.ClosedPeriodicEntryBook;
import org.chorem.lima.entity.ClosedPeriodicEntryBookImpl;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -31,8 +31,8 @@
import org.chorem.lima.beans.FinancialStatementAmounts;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.DocumentService;
-import org.chorem.lima.business.ejbinterface.FinancialStatementService;
+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;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -31,7 +31,7 @@
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+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.utils.EntryComparator;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -32,8 +32,8 @@
import org.chorem.lima.business.LimaBusinessException;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialPeriodService;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+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;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -31,7 +31,7 @@
import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.beans.FinancialTransactionSearchImpl;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+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;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+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;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -41,8 +41,8 @@
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
+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.entity.Entry;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/EntryBooksPane.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -36,7 +36,7 @@
import org.chorem.lima.LimaContext;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.EntryBookService;
+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.entity.EntryBook;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FinancialTransactionsPane.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -36,8 +36,8 @@
import org.chorem.lima.LimaContext;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
+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;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/FiscalPeriodsPane.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -36,7 +36,7 @@
import org.chorem.lima.LimaContext;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
+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.entity.FiscalPeriod;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/identity/IdentityHandler.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -28,7 +28,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.ejbinterface.IdentityService;
+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;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -32,8 +32,8 @@
import org.chorem.lima.beans.ReportsDatas;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FiscalPeriodService;
-import org.chorem.lima.business.ejbinterface.ReportService;
+import org.chorem.lima.business.api.FiscalPeriodService;
+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;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.FinancialTransactionService;
+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.utils.EntryComparator;
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-11 13:34:48 UTC (rev 3358)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2012-04-11 15:59:40 UTC (rev 3359)
@@ -29,7 +29,7 @@
import org.chorem.lima.beans.VatStatementAmounts;
import org.chorem.lima.business.LimaException;
import org.chorem.lima.business.ServiceListener;
-import org.chorem.lima.business.ejbinterface.VatStatementService;
+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;
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-04-11 13:34:48 UTC (rev 3358)
+++ trunk/pom.xml 2012-04-11 15:59:40 UTC (rev 3359)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.0.7</version>
+ <version>3.2</version>
</parent>
<groupId>org.chorem</groupId>
@@ -19,6 +19,7 @@
<modules>
<module>lima-callao</module>
+ <module>lima-business-api</module>
<module>lima-business</module>
<module>lima-swing</module>
</modules>
1
0
r3358 - trunk/lima-business/src/main/java/org/chorem/lima/service
by echatellier@users.chorem.org 11 Apr '12
by echatellier@users.chorem.org 11 Apr '12
11 Apr '12
Author: echatellier
Date: 2012-04-11 15:34:48 +0200 (Wed, 11 Apr 2012)
New Revision: 3358
Url: http://chorem.org/repositories/revision/lima/3358
Log:
Remove fixme
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2012-04-11 13:25:39 UTC (rev 3357)
+++ trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2012-04-11 13:34:48 UTC (rev 3358)
@@ -68,10 +68,8 @@
*/
public static void initFactory(ApplicationConfig config) {
- // TODO EC-20100407 maybe put all options in LimaConfig and allow user to configure it (remove getFlatOptions use)
- // TODO EC-20120113 i don't understand this comment anymore :(
- //Properties props = config.getFlatOptions();
- Properties props = config.getOptions();
+ // make a copy of options
+ Properties props = config.getFlatOptions();
// transmission des options de logging a openejb
// sinon, il utilise son propre pattern interne
1
0