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
May 2012
- 2 participants
- 37 discussions
r3434 - trunk/lima-callao/src/main/java/org/chorem/lima/entity
by echatellier@users.chorem.org 30 May '12
by echatellier@users.chorem.org 30 May '12
30 May '12
Author: echatellier
Date: 2012-05-30 16:06:48 +0200 (Wed, 30 May 2012)
New Revision: 3434
Url: http://chorem.org/repositories/revision/lima/3434
Log:
Fix queries
Modified:
trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java 2012-05-30 14:01:56 UTC (rev 3433)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java 2012-05-30 14:06:48 UTC (rev 3434)
@@ -109,9 +109,9 @@
Date endDate) throws TopiaException {
String query = getEquilibredTransactionQuery(beginDate, endDate) +
// concerne le compte
- " AND E.entryBook = :entryBook" +
+ " AND E = :entryBook" +
// fix order
- " ORDER BY, E.financialTransaction.beginDate, E.financialTransaction.topiaId";
+ " ORDER BY E.financialTransaction.transactionDate, E.financialTransaction.topiaId";
List<Entry> entries = context.find(query, "beginDate", beginDate,
"endDate", endDate, "entryBook", entryBook);
@@ -133,7 +133,7 @@
String query = "SELECT E.debit, sum(E.amount) " +
getEquilibredTransactionQuery(beginDate, endDate) +
// concerne le compte
- " AND E.entryBook = :entryBook" +
+ " AND E = :entryBook" +
" GROUP BY E.debit";
List<Object[]> result = context.find(query, "beginDate", beginDate,
1
0
r3433 - trunk/lima-business/src/main/java/org/chorem/lima/service
by echatellier@users.chorem.org 30 May '12
by echatellier@users.chorem.org 30 May '12
30 May '12
Author: echatellier
Date: 2012-05-30 16:01:56 +0200 (Wed, 30 May 2012)
New Revision: 3433
Url: http://chorem.org/repositories/revision/lima/3433
Log:
Remove openejb sysout
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-05-30 10:33:35 UTC (rev 3432)
+++ trunk/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java 2012-05-30 14:01:56 UTC (rev 3433)
@@ -89,7 +89,6 @@
// see http://openejb.apache.org/embedded-configuration.html
// http://openejb.apache.org/properties-listing.html
// for embedded configuration
- props.setProperty("openejb.nobanner", "false");
container = EJBContainer.createEJBContainer(props);
}
1
0
r3432 - in trunk: lima-business/src/main/java/org/chorem/lima/business/accountingrules lima-business/src/main/java/org/chorem/lima/business/ejb lima-business/src/test/java/org/chorem/lima/business/accountingrules lima-callao/src/main/java/org/chorem/lima/entity
by echatellier@users.chorem.org 30 May '12
by echatellier@users.chorem.org 30 May '12
30 May '12
Author: echatellier
Date: 2012-05-30 12:33:35 +0200 (Wed, 30 May 2012)
New Revision: 3432
Url: http://chorem.org/repositories/revision/lima/3432
Log:
Remove last topiaquery
Added:
trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java
Modified:
trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.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/VatStatementServiceImpl.java
trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java
trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2012-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/FranceAccountingRules.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -40,8 +40,6 @@
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.FiscalPeriodDAO;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
-import org.nuiton.topia.framework.TopiaQuery.Op;
import java.util.ArrayList;
import java.util.Calendar;
@@ -50,6 +48,11 @@
import static org.nuiton.i18n.I18n._;
+/**
+ * Surcharge des regles par defaut pour application à la comptabilité française.
+ *
+ * @author echatellier
+ */
public class FranceAccountingRules extends DefaultAccountingRules {
protected static final Log log = LogFactory.getLog(FranceAccountingRules.class);
@@ -119,10 +122,7 @@
//Checks if is not the first fiscalperiod to create
if (fiscalPeriodDAO.count() != 0) {
- TopiaQuery query = fiscalPeriodDAO.createQuery();
- query.addOrderDesc(FiscalPeriod.PROPERTY_END_DATE);
- //get the last fiscal period
- FiscalPeriod lastFiscalPeriod = fiscalPeriodDAO.findByQuery(query);
+ FiscalPeriod lastFiscalPeriod = fiscalPeriodDAO.getLastFiscalPeriod();
//check the new fiscal period adjoining the last
Date dateLastFiscalPeriod = lastFiscalPeriod.getEndDate();
@@ -173,19 +173,16 @@
/**
* Règles de vérification de fermeture d'un exercice, appliquées à la comptabilité française.
+ *
+ * On ne peut pas clore la dernière period comptable ouverte.
*/
@Override
public void blockFiscalPeriodRules(FiscalPeriod fiscalPeriod) throws LimaException {
try {
FiscalPeriodDAO fiscalPeriodDAO = getDaoHelper().getFiscalPeriodDAO();
- TopiaQuery query = fiscalPeriodDAO.createQuery();
- fiscalPeriodDAO.findAllByQuery(query);
- query.addWhere(FiscalPeriod.PROPERTY_LOCKED, Op.EQ, false);
- query.addOrder(FiscalPeriod.PROPERTY_END_DATE);
-
FiscalPeriod oldestUnBlockedFiscalPeriod =
- fiscalPeriodDAO.findByQuery(query);
+ fiscalPeriodDAO.getLastUnlockedFiscalPeriod();
//Check if the fiscal period to block is the oldest
if (!oldestUnBlockedFiscalPeriod.equals(fiscalPeriod)) {
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-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -50,7 +50,6 @@
import org.chorem.lima.entity.VatStatement;
import org.chorem.lima.entity.VatStatementDAO;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
import javax.ejb.Local;
import javax.ejb.Remote;
@@ -255,10 +254,8 @@
FinancialStatementDAO financialStatementDAO =
getDaoHelper().getFinancialStatementDAO();
- TopiaQuery query = financialStatementDAO.createQuery();
- query.addOrder(FinancialStatement.TOPIA_CREATE_DATE);
List<FinancialStatement> listFinancialStatements =
- financialStatementDAO.findAllByQuery(query);
+ financialStatementDAO.findAllOrderedByCreateDate();
// For all Financialstatements
for (FinancialStatement financialStatement : listFinancialStatements) {
@@ -332,10 +329,8 @@
// Get all Vatstatements
VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
- TopiaQuery query = vatStatementDAO.createQuery();
- query.addOrder(VatStatement.TOPIA_CREATE_DATE);
List<VatStatement> listVatStatements =
- vatStatementDAO.findAllByQuery(query);
+ vatStatementDAO.findAllOrderedByCreateDate();
// For all Vatstatements
for (VatStatement vatStatement : listVatStatements) {
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-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialPeriodServiceImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -45,11 +45,8 @@
import org.chorem.lima.entity.EntryBookDAO;
import org.chorem.lima.entity.FinancialPeriod;
import org.chorem.lima.entity.FinancialPeriodDAO;
-import org.chorem.lima.entity.FiscalPeriod;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
-
/**
* Gestion des périodes intermédiaires durant l'exercice.
* Chaque timeSpan sera fixe, et devra correspondre à un mois complet.
@@ -114,13 +111,8 @@
List<FinancialPeriod> result = null;
try {
-
FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
-
- TopiaQuery query = financialPeriodDAO.createQuery()
- .addOrder(FinancialPeriod.PROPERTY_BEGIN_DATE);
-
- result = financialPeriodDAO.findAllByQuery(query);
+ result = financialPeriodDAO.findAllOrderByBeginDate();
} catch (Exception ex) {
throw new LimaException("Can't get periods", ex);
}
@@ -135,14 +127,8 @@
List<FinancialPeriod> result = null;
try {
-
FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
-
- TopiaQuery query = financialPeriodDAO.createQuery()
- .addEquals(FinancialPeriod.PROPERTY_LOCKED, Boolean.FALSE)
- .addOrder(FinancialPeriod.PROPERTY_BEGIN_DATE);
-
- result = financialPeriodDAO.findAllByQuery(query);
+ result = financialPeriodDAO.findAllUnlockedOrderByBeginDate();
} catch (Exception ex) {
throw new LimaException("Can't create period", ex);
}
@@ -158,12 +144,7 @@
try {
FinancialPeriodDAO financialPeriodDAO = getDaoHelper().getFinancialPeriodDAO();
-
- TopiaQuery query = financialPeriodDAO.createQuery()
- .addBetween(FinancialPeriod.PROPERTY_BEGIN_DATE, beginDate, endDate)
- .addOrder(FinancialPeriod.PROPERTY_BEGIN_DATE);
-
- result = financialPeriodDAO.findAllByQuery(query);
+ result = financialPeriodDAO.findByDates(beginDate, endDate);
} catch (Exception ex) {
throw new LimaException("Can't get period", ex);
}
@@ -201,9 +182,7 @@
ClosedPeriodicEntryBook closedPeriodicEntryBook = null;
try {
-
ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = getDaoHelper().getClosedPeriodicEntryBookDAO();
-
closedPeriodicEntryBook = closedPeriodicEntryBookDAO.findByEntryBookAndFinancialPeriod(entryBook, financialPeriod);
} catch (Exception ex) {
throw new LimaException("Can't get closed periodic", ex);
@@ -218,33 +197,8 @@
List<ClosedPeriodicEntryBook> result = null;
try {
-
- ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO
- = getDaoHelper().getClosedPeriodicEntryBookDAO();
-
- //Get closedperiodicentrybook from unlocked fiscalperiod
- TopiaQuery query = closedPeriodicEntryBookDAO.createQuery("E");
- query.addFrom(FiscalPeriod.class, "F")
- .addInElements("E." + ClosedPeriodicEntryBook.PROPERTY_FINANCIAL_PERIOD,
- "F." + FiscalPeriod.PROPERTY_FINANCIAL_PERIOD)
- .addEquals("F." + FiscalPeriod.PROPERTY_LOCKED, Boolean.FALSE);
- String orderProperty =
- TopiaQuery.getProperty("E", ClosedPeriodicEntryBook.PROPERTY_FINANCIAL_PERIOD,
- FinancialPeriod.PROPERTY_BEGIN_DATE);
- query.addOrder(orderProperty);
-
- //IMPORTANT : LOADING ClosedPeriodicEntryBook AND IS COLUMN FOR NO LAZY EXCEPTION
- String loadEntryBookProperty =
- TopiaQuery.getProperty(ClosedPeriodicEntryBook.PROPERTY_ENTRY_BOOK,
- EntryBook.PROPERTY_LABEL);
- query.addLoad(loadEntryBookProperty);
- String loadFinancialPeriodProperty =
- TopiaQuery.getProperty(ClosedPeriodicEntryBook.PROPERTY_FINANCIAL_PERIOD,
- FinancialPeriod.PROPERTY_BEGIN_DATE);
- query.addLoad(loadFinancialPeriodProperty);
-
- //call query
- result = closedPeriodicEntryBookDAO.findAllByQuery(query);
+ ClosedPeriodicEntryBookDAO closedPeriodicEntryBookDAO = getDaoHelper().getClosedPeriodicEntryBookDAO();
+ result = closedPeriodicEntryBookDAO.findAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod();
} catch (Exception ex) {
throw new LimaException("Can't get closed periodics", ex);
}
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-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialStatementServiceImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -25,6 +25,19 @@
package org.chorem.lima.business.ejb;
+import static org.nuiton.i18n.I18n._;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.ejb.EJB;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+
import org.apache.commons.lang3.StringUtils;
import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.beans.Amounts;
@@ -42,22 +55,7 @@
import org.chorem.lima.entity.FinancialStatement;
import org.chorem.lima.entity.FinancialStatementDAO;
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.Remote;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import static org.nuiton.i18n.I18n._;
-
@Stateless
@Remote(FinancialStatementService.class)
@TransactionAttribute
@@ -162,13 +160,8 @@
List<FinancialStatement> financialStatements = null;
try {
-
FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
-
- TopiaQuery query = financialStatementDAO.createQuery();
- query.addEquals(FinancialStatement.PROPERTY_MASTER_FINANCIAL_STATEMENT, masterFinancialStatement)
- .addOrder(FinancialStatement.TOPIA_CREATE_DATE);
- financialStatements = financialStatementDAO.findAllByQuery(query);
+ financialStatements = financialStatementDAO.findChildrenFinancialStatement(masterFinancialStatement);
} catch (Exception ex) {
throw new LimaException("Can't get childreen statements", ex);
}
@@ -503,28 +496,4 @@
}
return result.toString();
}
-
- protected List<FinancialStatement> findFinancialStatementByAccountNumber(String accountNumber) throws TopiaException {
-
- FinancialStatementDAO financialStatementDAO = getDaoHelper().getFinancialStatementDAO();
- TopiaQuery query = financialStatementDAO.createQuery();
-
- String accountProperty =
- TopiaQuery.getProperty(FinancialStatement.PROPERTY_ACCOUNTS);
- String creditAccountProperty =
- TopiaQuery.getProperty(FinancialStatement.PROPERTY_CREDIT_ACCOUNTS);
- String debitAccountProperty =
- TopiaQuery.getProperty(FinancialStatement.PROPERTY_DEBIT_ACCOUNTS);
- String provisionDeprecationProperty =
- TopiaQuery.getProperty(FinancialStatement.PROPERTY_PROVISION_DEPRECATION_ACCOUNTS);
- String likeCondition = " " + Op.LIKE + " '%" + accountNumber + "%'";
-
- query.addWhere(accountProperty + likeCondition
- + " OR " + creditAccountProperty + likeCondition
- + " OR " + debitAccountProperty + likeCondition
- + " OR " + provisionDeprecationProperty + likeCondition);
-
- return financialStatementDAO.findAllByQuery(query);
- }
-
}
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-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialTransactionServiceImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -35,7 +35,6 @@
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
-import org.chorem.lima.FinancialStatementWayEnum;
import org.chorem.lima.beans.FinancialTransactionSearch;
import org.chorem.lima.business.AccountingRules;
import org.chorem.lima.business.LimaConfig;
@@ -55,8 +54,6 @@
import org.chorem.lima.entity.FinancialTransactionDAO;
import org.chorem.lima.entity.FiscalPeriod;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
-import org.nuiton.topia.framework.TopiaQuery.Op;
/**
* Cette classe permet la création d'une transaction comptable dans l'application.
@@ -345,95 +342,27 @@
@Override
public List<Object> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch) throws LimaException {
List<Object> result = new ArrayList<Object>();
- List<FinancialTransaction> financialTransactions;
try {
- FinancialTransactionDAO financialTransactionDAO = getDaoHelper().getFinancialTransactionDAO();
- TopiaQuery query = financialTransactionDAO.createQuery("T");
-
- String dateProperty = TopiaQuery.getProperty(FinancialTransaction.PROPERTY_TRANSACTION_DATE);
- String accountNumberProperty = TopiaQuery.getProperty(Entry.PROPERTY_ACCOUNT, Account.PROPERTY_ACCOUNT_NUMBER);
-
- query.addDistinct();
- query.addLeftJoin("T." + FinancialTransaction.PROPERTY_ENTRY, "E", true);
- //Load for lazy
- query.addLoad(FinancialTransaction.PROPERTY_ENTRY_BOOK);
- // .addLoad(FinancialTransaction.PROPERTY_FINANCIAL_PERIOD);
-
- Date beginDate = financialTransactionSearch.getBeginDate();
- Date endDate = financialTransactionSearch.getEndDate();
- if (beginDate != null && endDate != null) {
- query.addBetween(dateProperty, beginDate, endDate);
- } else if (beginDate != null) {
- query.addEquals(dateProperty, beginDate);
- }
- String voucher = financialTransactionSearch.getVoucher();
- if (voucher != null) {
- query.addWhere("E.voucher", Op.LIKE, "%" + voucher + "%");
- }
- String description = financialTransactionSearch.getDescription();
- if (description != null) {
- query.addWhere("E.description", Op.LIKE, "%" + description + "%");
- }
- String letter = financialTransactionSearch.getLettering();
- if (letter != null) {
- query.addEquals("E.lettering", letter);
- }
- Account account = financialTransactionSearch.getAccount();
+ // first search on account dao
String accountsList = financialTransactionSearch.getAccountList();
- if (account != null) {
- query.addEquals("E.account", account);
- } else if (accountsList != null) {
+ List<Account> accounts = null;
+ if (accountsList != null) {
AccountDAO accountDAO = getDaoHelper().getAccountDAO();
- List<Account> accounts =
- accountDAO.stringToListAccounts(accountsList, false);
- StringBuffer accountNumbers = new StringBuffer("0,");
- int max = accounts.size();
- for (int i = 1; i <= max; i++) {
- accountNumbers.append(accounts.get(i - 1).getAccountNumber());
- if (i != max) {
- accountNumbers.append(",");
- }
- }
- if (accounts.size() > 0) {
- query.addWhere("E." + accountNumberProperty + " in (" + accountNumbers + ")");
- }
-
+ accounts = accountDAO.stringToListAccounts(accountsList, false);
}
- EntryBook entryBook = financialTransactionSearch.getEntryBook();
- String amount = financialTransactionSearch.getAmount();
- String amount2 = financialTransactionSearch.getAmount2();
- String operator = financialTransactionSearch.getOperator();
- FinancialStatementWayEnum fStWayEnum = financialTransactionSearch.getAmountWayEnum();
- if (entryBook != null) {
- query.addEquals("T." + FinancialTransaction.PROPERTY_ENTRY_BOOK, entryBook);
- }
- if (amount != null) {
- if (amount2 != null) {
- BigDecimal value1 = new BigDecimal(amount);
- BigDecimal value2 = new BigDecimal(amount2);
- query.addBetween("E.amount", value1, value2);
- } else if (operator != null) {
- query.addWhere("E.amount" + " " + operator + " " + amount);
- }
- switch (fStWayEnum) {
- case CREDIT:
- query.addEquals("E.debit", false);
- break;
- case DEBIT:
- query.addEquals("E.debit", true);
- break;
- }
- }
- financialTransactions = financialTransactionDAO.findAllByQuery(query);
+ // next on financial transaction dao
+ FinancialTransactionDAO financialTransactionDAO = getDaoHelper().getFinancialTransactionDAO();
+ List<FinancialTransaction> financialTransactions = financialTransactionDAO.searchFinancialTransaction(
+ financialTransactionSearch, accounts);
+
+ // merge result with sub entries
EntryDAO entryDAO = getDaoHelper().getEntryDAO();
for (FinancialTransaction financialTransaction : financialTransactions) {
result.add(financialTransaction);
- TopiaQuery query2 = entryDAO.createQuery();
- query2.addEquals(Entry.PROPERTY_FINANCIAL_TRANSACTION, financialTransaction);
- List<Entry> entries = entryDAO.findAllByQuery(query2);
+ List<Entry> entries = entryDAO.findAllByFinancialTransaction(financialTransaction);
result.addAll(entries);
}
} catch (Exception ex) {
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-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FiscalPeriodServiceImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -67,7 +67,6 @@
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.entity.FiscalPeriodDAO;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
/**
* Gestion des exercices.
@@ -201,11 +200,8 @@
try {
FiscalPeriodDAO fiscalPeriodDAO = getDaoHelper().getFiscalPeriodDAO();
- TopiaQuery query = fiscalPeriodDAO.createQuery();
- query.addOrderDesc(FiscalPeriod.PROPERTY_END_DATE);
-
//get the last fiscal period
- result = fiscalPeriodDAO.findByQuery(query);
+ result = fiscalPeriodDAO.getLastFiscalPeriod();
} catch (Exception ex) {
throw new LimaException("Can't get period", ex);
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-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/VatStatementServiceImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -46,10 +46,7 @@
import org.chorem.lima.entity.AccountDAO;
import org.chorem.lima.entity.VatStatement;
import org.chorem.lima.entity.VatStatementDAO;
-import org.chorem.lima.entity.VatStatementImpl;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
-import org.nuiton.topia.framework.TopiaQuery.Op;
/**
* Permet d'implémenter le plan de la déclaration de TVA
@@ -125,12 +122,8 @@
try {
VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
-
- TopiaQuery query = vatStatementDAO.createQuery();
- query.addEquals("masterVatStatement", masterVatStatement)
- .addOrder(VatStatement.TOPIA_CREATE_DATE);
- vatStatements = vatStatementDAO.findAllByQuery(query);
- } catch (Exception ex) {
+ vatStatements = vatStatementDAO.getChildrenVatStatement(masterVatStatement);
+ } catch (TopiaException ex) {
throw new LimaException("Can't get vat statements", ex);
}
return vatStatements;
@@ -145,7 +138,7 @@
VatStatementDAO vatStatementHeaderDAO = getDaoHelper().getVatStatementDAO();
//update
vatStatementHeaderDAO.update(vatStatement);
- } catch (Exception ex) {
+ } catch (TopiaException ex) {
throw new LimaException("Can't update vat statement", ex);
}
}
@@ -212,24 +205,10 @@
try {
VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
- TopiaQuery query = vatStatementDAO.createQuery();
+ VatStatement vatStatement2 = vatStatementDAO.findVatStatementByLabel(vatStatement.getLabel());
- String labelProperty =
- TopiaQuery.getProperty(VatStatement.PROPERTY_LABEL);
-
- //not to be used causing query exception with ' character
- //query.addWhere(labelProperty + " " + Op.LIKE + " '%" +
- // vatStatement.getLabel() + "%'");
-
- query.addWhere(labelProperty, Op.LIKE, vatStatement.getLabel());
- query.setMaxResults(1);
-
- log.debug("query to find account by VAT " + query);
-
- List<VatStatement> vatStatementsList = vatStatementDAO.findAllByQuery(query);
-
- if (vatStatementsList.size() > 0) {
- accountNumbersList = vatStatementsList.get(0).getAccounts();
+ if (vatStatement2 != null) {
+ accountNumbersList = vatStatement2.getAccounts();
}
} catch (TopiaException ex) {
throw new LimaException("Can't find accountNumber by vatStatement", ex);
@@ -275,32 +254,13 @@
@Override
public VatStatement findVatStatementByString(String label) throws LimaException {
- VatStatement vatStatement = new VatStatementImpl();
+ VatStatement vatStatement = null;
try {
VatStatementDAO vatStatementDAO = getDaoHelper().getVatStatementDAO();
- TopiaQuery query = vatStatementDAO.createQuery();
+ vatStatement = vatStatementDAO.findVatStatementByLabel(label);
- String labelProperty =
- TopiaQuery.getProperty(VatStatement.PROPERTY_LABEL);
-
- //not to be used causing query exception with ' character
- //query.addWhere(labelProperty + " " + Op.LIKE + " '%" +
- // vatStatement.getLabel() + "%'");
-
- query.addWhere(labelProperty, Op.LIKE, label);
- query.setMaxResults(1);
-
- log.debug("query to find account by VAT " + query);
-
- List<VatStatement> vatStatementsList =
- vatStatementDAO.findAllByQuery(query);
-
- if (vatStatementsList.size() > 0) {
- vatStatement = vatStatementsList.get(0);
- }
-
} catch (TopiaException ex) {
throw new LimaException("Can't find vatstatement", ex);
}
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-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/accountingrules/TestAccountingRules.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -32,7 +32,6 @@
import org.chorem.lima.entity.FiscalPeriodDAO;
import org.junit.Ignore;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
import java.util.ArrayList;
import java.util.Calendar;
@@ -73,10 +72,7 @@
//Checks if is not the first fiscalperiod to create
if (fiscalPeriodDAO.count() != 0) {
- TopiaQuery query = fiscalPeriodDAO.createQuery();
- query.addOrderDesc(FiscalPeriod.PROPERTY_END_DATE);
- //get the last fiscal period
- FiscalPeriod lastFiscalPeriod = fiscalPeriodDAO.findByQuery(query);
+ FiscalPeriod lastFiscalPeriod = fiscalPeriodDAO.getLastFiscalPeriod();
//check the new fiscal period adjoining the last
Date dateLastFiscalPeriod = lastFiscalPeriod.getEndDate();
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2012-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -161,11 +161,6 @@
}
//search all account start with accountnumber
else {
- /*TopiaQuery query = createQuery();
- String subAccountsProperty = TopiaQuery.getProperty(Account.PROPERTY_SUB_ACCOUNTS);
- query.addWhere("not exists elements (" + subAccountsProperty + ")")
- .addWhere(Account.PROPERTY_ACCOUNT_NUMBER, Op.LIKE, s + "%");
- List<Account> accountsResult = (List<Account>) findAllByQuery(query);*/
String query = "FROM " + Account.class.getName() + " a WHERE NOT IN (" +
"FROM " + Account.class.getName() + " b where b.accountNumber like a.accountNumber+'%')" +
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java 2012-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -115,7 +115,7 @@
" WHERE :begindate <= financialPeriod.beginDate " +
" AND financialPeriod.beginDate <= :endDate" +
" ORDER BY entryBook.code";
- return context.find(query, 0d, 0d, "beginDate", beginDate, "endDate", endDate);
+ return context.find(query, "beginDate", beginDate, "endDate", endDate);
}
/**
@@ -135,7 +135,7 @@
" WHERE :begindate <= financialPeriod.beginDate " +
" AND financialPeriod.beginDate <= :endDate" +
" AND entryBook = :entryBook";
- return context.find(query, 0d, 0d, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook);
+ return context.find(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook);
}
/**
@@ -156,7 +156,23 @@
" AND financialPeriod.beginDate <= :endDate" +
" AND entryBook = :entryBook" +
" AND locked = true";
- return context.find(query, 0d, 0d, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook);
+ return context.find(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook);
}
+ /**
+ * Retourne les ClosedPeriodicEntryBook clos de toutes les exercive encore ouvert.
+ *
+ * @return les ClosedPeriodicEntryBook
+ * @throws TopiaException
+ */
+ public List<ClosedPeriodicEntryBook> findAllClosedPeriodicEntryBooksFromUnblockedFiscalPeriod() throws TopiaException {
+ String query = "FROM " + ClosedPeriodicEntryBook.class.getName() + " C" +
+ ", " + FiscalPeriod.class.getName() + " F" +
+ " WHERE E.financialPeriod IN ELEMENTS (F.financialPeriod)" +
+ " ORDER BY E.financialPeriod.beginDate";
+
+ List<ClosedPeriodicEntryBook> result = context.find(query);
+ return result;
+ }
+
}
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java 2012-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -67,11 +67,43 @@
String query = "FROM " + FinancialPeriod.class.getName() +
" WHERE :beginDate <= beginDate" +
- " AND beginDate <= :endDate";
+ " AND beginDate <= :endDate" +
+ " ORDER by beginDate";
// add unique result here
List<FinancialPeriod> financialPeriod = context.find(query, "beginDate", beginDate, "endDate", endDate);
return financialPeriod;
}
+ /**
+ * Retourne toutes les periodes ordonnées par date de debut de periode.
+ *
+ * @return all period ordered
+ * @throws TopiaException
+ */
+ public List<FinancialPeriod> findAllOrderByBeginDate() throws TopiaException {
+ String query = "FROM " + FinancialPeriod.class.getName() +
+ " ORDER BY beginDate";
+
+ // add unique result here
+ List<FinancialPeriod> financialPeriod = context.find(query);
+ return financialPeriod;
+ }
+
+ /**
+ * Retourne toutes les periodes ordonnées par date de debut de periode.
+ *
+ * @return all period ordered
+ * @throws TopiaException
+ */
+ public List<FinancialPeriod> findAllUnlockedOrderByBeginDate() throws TopiaException {
+ String query = "FROM " + FinancialPeriod.class.getName() +
+ " WHERE locked = false" +
+ " ORDER BY beginDate";
+
+ // add unique result here
+ List<FinancialPeriod> financialPeriod = context.find(query);
+ return financialPeriod;
+ }
+
}
Added: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java (rev 0)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -0,0 +1,66 @@
+/*
+ * #%L
+ * Lima callao
+ *
+ * $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.entity;
+
+import java.util.List;
+
+import org.nuiton.topia.TopiaException;
+
+/**
+ * Ajout de requetes specifiques aux {@link FinancialStatement} sur le DAO.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class FinancialStatementDAOImpl<E extends FinancialStatement> extends FinancialStatementDAOAbstract<FinancialStatement> {
+
+ /**
+ * Find all {@code FinancialStatement} ordered by topia create date.
+ * @throws TopiaException
+ */
+ public List<FinancialStatement> findAllOrderedByCreateDate() throws TopiaException {
+ String query = "FROM " + FinancialStatement.class.getName() +
+ " ORDER BY " + FinancialStatement.TOPIA_CREATE_DATE;
+ List<FinancialStatement> result = context.find(query);
+ return result;
+ }
+
+ /**
+ * Find all {@code FinancialStatement} ordered by topia create date.
+ * @throws TopiaException
+ */
+ public List<FinancialStatement> findChildrenFinancialStatement(FinancialStatement financialStatement) throws TopiaException {
+ String query = "FROM " + FinancialStatement.class.getName() +
+ " WHERE masterFinancialStatement = :masterFinancialStatement" +
+ " ORDER BY " + FinancialStatement.TOPIA_CREATE_DATE;
+ List<FinancialStatement> result = context.find(query, "masterFinancialStatement", financialStatement);
+ return result;
+ }
+
+} //FinancialStatementDAO
Property changes on: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java 2012-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -25,9 +25,14 @@
package org.chorem.lima.entity;
+import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import org.apache.commons.collections.CollectionUtils;
+import org.chorem.lima.FinancialStatementWayEnum;
+import org.chorem.lima.beans.FinancialTransactionSearch;
import org.nuiton.topia.TopiaException;
/**
@@ -239,4 +244,123 @@
return result;
}
+ /**
+ * Search financial transaction.
+ *
+ * @param financialTransactionSearch search parameters
+ * @param accounts search accounts
+ * @return financial transaction
+ * @throws TopiaException
+ */
+ public List<FinancialTransaction> searchFinancialTransaction(FinancialTransactionSearch financialTransactionSearch,
+ List<Account> accounts) throws TopiaException {
+ String query = "SELECT T FROM " + FinancialTransaction.class.getName() + " T"+
+ " LEFT JOIN T.entry AS E" +
+ " WHERE TRUE "; // to not manage first where in all condition
+
+ List<Object> args = new ArrayList<Object>();
+
+ // dates
+ Date beginDate = financialTransactionSearch.getBeginDate();
+ Date endDate = financialTransactionSearch.getEndDate();
+ if (beginDate != null && endDate != null) {
+ query += " AND :beginDate <= T.transactionDate" +
+ " AND T.transactionDate <= :endDate";
+ args.add("beginDate");
+ args.add(beginDate);
+ args.add("endDate");
+ args.add(endDate);
+ } else if (beginDate != null) {
+ query += " AND :beginDate = T.transactionDate";
+ args.add(beginDate);
+ args.add("beginDate");
+ }
+
+ // voucher
+ String voucher = financialTransactionSearch.getVoucher();
+ if (voucher != null) {
+ query += " AND E.voucher LIKE :voucher";
+ args.add("voucher");
+ args.add("%" + voucher + "%");
+ }
+
+ // description
+ String description = financialTransactionSearch.getDescription();
+ if (description != null) {
+ query += " AND E.description LIKE :description";
+ args.add("description");
+ args.add("%" + description + "%");
+ }
+
+ // letter
+ String lettering = financialTransactionSearch.getLettering();
+ if (lettering != null) {
+ query += " AND E.lettering = :lettering";
+ args.add("lettering");
+ args.add("%" + lettering + "%");
+ }
+
+ // accounts
+ Account account = financialTransactionSearch.getAccount();
+ String accountsList = financialTransactionSearch.getAccountList();
+ if (account != null) {
+ query += " AND E.account = :account";
+ args.add("account");
+ args.add(account);
+ } else if (CollectionUtils.isNotEmpty(accounts)) {
+ StringBuffer accountNumbers = new StringBuffer();
+ for (int i = 0; i < accounts.size(); i++) {
+ accountNumbers.append(accounts.get(i - 1).getAccountNumber());
+ if (i < accounts.size() - 1) {
+ accountNumbers.append(",");
+ }
+ }
+ if (accounts.size() > 0) {
+ query += " AND E.accountNumber in (" + accountNumbers + ")";
+ }
+
+ }
+
+ // entry book
+ EntryBook entryBook = financialTransactionSearch.getEntryBook();
+ if (entryBook != null) {
+ query += " AND T." + FinancialTransaction.PROPERTY_ENTRY_BOOK + " = :entryBook";
+ args.add("entryBook");
+ args.add(entryBook);
+ }
+
+ // amounts
+ String amount = financialTransactionSearch.getAmount();
+ String amount2 = financialTransactionSearch.getAmount2();
+ String operator = financialTransactionSearch.getOperator();
+ FinancialStatementWayEnum fStWayEnum = financialTransactionSearch.getAmountWayEnum();
+ if (amount != null) {
+ if (amount2 != null) {
+ BigDecimal value1 = new BigDecimal(amount);
+ BigDecimal value2 = new BigDecimal(amount2);
+ query += " AND :amount <= E.amount AND E.amount <= :amount2";
+ args.add("amount");
+ args.add(amount);
+ args.add("amount2");
+ args.add(amount2);
+ } else if (operator != null) {
+ query += " AND E.amount " + operator + " :amount";
+ args.add("amount");
+ args.add(amount);
+ }
+ switch (fStWayEnum) {
+ case CREDIT:
+ query += " AND E.debit = false";
+ break;
+ case DEBIT:
+ query += " AND E.debit = true";
+ break;
+ }
+ }
+
+ // perform query
+ List<FinancialTransaction> result = context.find(query, args.toArray());
+ return result;
+ }
+
} //FinancialTransactionDAO
Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java 2012-05-28 08:33:31 UTC (rev 3431)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -74,4 +74,43 @@
}
return result;
}
+
+ /**
+ * Get last fiscal period (higher end date).
+ *
+ * @return last fiscal period
+ * @throws TopiaException
+ */
+ public FiscalPeriod getLastFiscalPeriod() throws TopiaException {
+ String query = "FROM " + FiscalPeriod.class.getName() +
+ " ORDER BY endDate";
+
+ List<FiscalPeriod> fiscalPeriods = context.find(query);
+ FiscalPeriod result = null;
+ if (!fiscalPeriods.isEmpty()) {
+ result = fiscalPeriods.get(0);
+ }
+
+ return result;
+ }
+
+ /**
+ * Get last non locked fiscal period (higher end date).
+ *
+ * @return last fiscal period
+ * @throws TopiaException
+ */
+ public FiscalPeriod getLastUnlockedFiscalPeriod() throws TopiaException {
+ String query = "FROM " + FiscalPeriod.class.getName() +
+ " WHERE locked = false" +
+ " ORDER BY endDate";
+
+ List<FiscalPeriod> fiscalPeriods = context.find(query);
+ FiscalPeriod result = null;
+ if (!fiscalPeriods.isEmpty()) {
+ result = fiscalPeriods.get(0);
+ }
+
+ return result;
+ }
}
Added: trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java
===================================================================
--- trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java (rev 0)
+++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java 2012-05-30 10:33:35 UTC (rev 3432)
@@ -0,0 +1,90 @@
+/*
+ * #%L
+ * Lima callao
+ *
+ * $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.entity;
+
+import java.util.List;
+
+import org.nuiton.topia.TopiaException;
+
+
+/**
+ * Ajout de requetes specifiques aux {@code VatStatement} sur le DAO.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class VatStatementDAOImpl<E extends VatStatement> extends VatStatementDAOAbstract<VatStatement> {
+
+ /**
+ * Find all {@code VatStatement} ordered by topia create date.
+ * @throws TopiaException
+ */
+ public List<VatStatement> findAllOrderedByCreateDate() throws TopiaException {
+ String query = "FROM " + VatStatement.class.getName() +
+ " ORDER BY " + VatStatement.TOPIA_CREATE_DATE;
+ List<VatStatement> result = context.find(query);
+ return result;
+ }
+
+ /**
+ * Get masterVatStatement children statement.
+ *
+ * @param masterVatStatement master VatStatement
+ * @return children VatStatement
+ * @throws TopiaException
+ */
+ public List<VatStatement> getChildrenVatStatement(VatStatement masterVatStatement) throws TopiaException {
+ String query = "FROM " + VatStatement.class.getName() +
+ " WHERE masterVatStatement = :masterVatStatement" +
+ " ORDER BY " + VatStatement.TOPIA_CREATE_DATE;
+ List<VatStatement> result = context.find(query, "masterVatStatement", masterVatStatement);
+ return result;
+ }
+
+ /**
+ * Recherche un statement par equivalence de label.
+ *
+ * TODO voir a quoi ca sert vraiment.
+ *
+ * @param label label
+ * @return statement like label
+ * @throws TopiaException
+ */
+ public VatStatement findVatStatementByLabel(String label) throws TopiaException {
+ String query = "FROM " + VatStatement.class.getName() +
+ " WHERE label LIKE :label";
+ List<VatStatement> statements = context.find(query, "label", "%" + label + "%");
+ VatStatement result = null;
+ if (!statements.isEmpty()) {
+ result = statements.get(0);
+ }
+ return result;
+ }
+
+} //VatStatementDAO
Property changes on: trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
Author: maven-release
Date: 2012-05-28 10:33:31 +0200 (Mon, 28 May 2012)
New Revision: 3431
Url: http://chorem.org/repositories/revision/lima/3431
Log:
updates to mavenpom 3.3.2
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-05-16 15:50:57 UTC (rev 3430)
+++ trunk/pom.xml 2012-05-28 08:33:31 UTC (rev 3431)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>3.3.1</version>
+ <version>3.3.2</version>
</parent>
<groupId>org.chorem</groupId>
1
0
r3430 - in trunk/lima-swing/src/main/java/org/chorem/lima: ui/financialstatementchart ui/financialtransactionsearch ui/fiscalperiod util
by echatellier@users.chorem.org 16 May '12
by echatellier@users.chorem.org 16 May '12
16 May '12
Author: echatellier
Date: 2012-05-16 17:50:57 +0200 (Wed, 16 May 2012)
New Revision: 3430
Url: http://chorem.org/repositories/revision/lima/3430
Log:
Remove another "helper" class.
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-05-16 14:25:36 UTC (rev 3429)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-05-16 15:50:57 UTC (rev 3430)
@@ -27,7 +27,10 @@
import static org.nuiton.i18n.I18n._;
+import java.awt.Component;
+
import javax.swing.JOptionPane;
+import javax.swing.JTextArea;
import javax.swing.tree.TreePath;
import org.apache.commons.logging.Log;
@@ -41,8 +44,9 @@
import org.chorem.lima.enums.ImportExportEnum;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.importexport.ImportExport;
-import org.chorem.lima.util.DialogHelper;
+import org.chorem.lima.util.ReportDialogView;
import org.jdesktop.swingx.JXTreeTable;
+import org.nuiton.util.Resource;
/**
* Handler associated with account view.
@@ -244,8 +248,26 @@
public void financialStatementChartCheck() {
String result = financialStatementService.checkFinancialStatementChart();
- DialogHelper.showReportDialog(result, _("lima.financialstatement.check"), view);
+ showReportDialog(result, _("lima.financialstatement.check"), view);
}
+
+ /**
+ * Permet d'afficher une boite de dialogue avec rapport
+ *
+ * @param message
+ * @param parent
+ * @param title
+ */
+ public void showReportDialog(String message, String title, Component parent) {
+ ReportDialogView reportDialogView = new ReportDialogView();
+ reportDialogView.setIconImage(Resource.getIcon("icons/lima.png").getImage());
+ JTextArea textArea = reportDialogView.getTextArea();
+ textArea.setText(message);
+ reportDialogView.setSize(600, 400);
+ reportDialogView.setTitle(title);
+ reportDialogView.setLocationRelativeTo(parent);
+ reportDialogView.setVisible(true);
+ }
@Override
public void notifyMethod(String serviceName, String methodName) {
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-05-16 14:25:36 UTC (rev 3429)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchViewHandler.java 2012-05-16 15:50:57 UTC (rev 3430)
@@ -45,7 +45,6 @@
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.service.LimaServiceFactory;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.chorem.lima.util.DialogHelper;
/**
* Handler associated with financial transaction view.
@@ -206,19 +205,12 @@
if (response == JOptionPane.YES_OPTION) {
- try {
- tableModel.removeObject(selectedValue, 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);
- }
+ tableModel.removeObject(selectedValue, indexSelectedRow);
+ //select the upper line
+ ListSelectionModel selectionModel =
+ table.getSelectionModel();
+ selectionModel.setSelectionInterval(
+ indexSelectedRow - 1, indexSelectedRow - 1);
}
} else {
if (log.isWarnEnabled()) {
@@ -238,24 +230,17 @@
int indexSelectedRow = table.getSelectedRow();
if (indexSelectedRow != -1) {
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
- try {
- //copy + paste the description
- String description = (String) tableModel.getValueAt(indexSelectedRow, 4);
- int index = tableModel.addEmptyEntry(selectedValue, description, 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 add emptyentry", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
- }
+ //copy + paste the description
+ String description = (String) tableModel.getValueAt(indexSelectedRow, 4);
+ int index = tableModel.addEmptyEntry(selectedValue, description, 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();
} else {
if (log.isWarnEnabled()) {
log.warn("Call addentry selected transaction without selection");
@@ -282,22 +267,15 @@
if (indexSelectedRow != -1) {
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
if (clipBoard instanceof Entry) {
- try {
- int index = tableModel.addEntry(selectedValue, (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);
- }
+ int index = tableModel.addEntry(selectedValue, (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();
}
}
@@ -310,22 +288,15 @@
table = view.getFinancialTransactionSearchTable();
tableModel = view.getFinancialTransactionSearchTableModel();
- try {
- int index = tableModel.addFinancialTransaction();
- //select the new line
- int numberRow = table.getRowCount();
- ListSelectionModel selectionModel =
- table.getSelectionModel();
- selectionModel.setSelectionInterval(numberRow - 1, numberRow - 1);
- //focus on first column
- table.changeSelection(index, 0, false, false);
- table.requestFocusInWindow();
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't add financialtransaction", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
- }
+ int index = tableModel.addFinancialTransaction();
+ //select the new line
+ int numberRow = table.getRowCount();
+ ListSelectionModel selectionModel =
+ table.getSelectionModel();
+ selectionModel.setSelectionInterval(numberRow - 1, numberRow - 1);
+ //focus on first column
+ table.changeSelection(index, 0, false, false);
+ table.requestFocusInWindow();
}
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-05-16 14:25:36 UTC (rev 3429)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-05-16 15:50:57 UTC (rev 3430)
@@ -48,7 +48,6 @@
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.service.LimaServiceFactory;
-import org.chorem.lima.util.DialogHelper;
import org.jdesktop.swingx.JXTable;
import org.nuiton.util.DateUtil;
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2012-05-16 14:25:36 UTC (rev 3429)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/util/DialogHelper.java 2012-05-16 15:50:57 UTC (rev 3430)
@@ -1,97 +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.nuiton.util.Resource;
-
-import javax.swing.JFrame;
-import javax.swing.JOptionPane;
-import javax.swing.JTextArea;
-import java.awt.Component;
-
-import static org.nuiton.i18n.I18n._;
-
-/**
- * @author ore
- * @author Rémi Chapelet
- * @deprecated with no replacement, use JOptionPane directly
- */
-@Deprecated
-public class DialogHelper {
-
- /**
- * Use instead: JOptionPane.showMessageDialog (String message,String titre,int type)
- * <p/>
- * for e.g:
- * JOptionPane.showMessageDialog(
- * view,
- * _("lima.importexport.export.terminated"),
- * _("lima.importexport.export"),
- * JOptionPane.INFORMATION_MESSAGE);
- *
- * @param message
- * @deprecated since 0.5, prefer use the method {@link #showErrorMessageDialog(Component, Throwable)}
- */
- @Deprecated
- public static void showMessageDialog(String message) {
- JFrame f = new JFrame();
- f.setIconImage(Resource.getIcon("icons/lima.png").getImage());
- JOptionPane.showMessageDialog(
- f,
- message,
- _("lima.common.error"),
- JOptionPane.ERROR_MESSAGE);
- f.dispose();
- }
-
- public static void showErrorMessageDialog(Component view, Throwable e) {
- JOptionPane.showMessageDialog(
- view,
- e.getMessage(),
- _("lima.common.error"),
- JOptionPane.ERROR_MESSAGE);
- }
-
- /**
- * Permet d'afficher une boite de dialogue avec rapport
- *
- * @param message
- * @param parent
- * @param title
- */
- public static void showReportDialog(String message, String title, Component parent) {
- ReportDialogView reportDialogView = new ReportDialogView();
- reportDialogView.setIconImage(Resource.getIcon("icons/lima.png").getImage());
- JTextArea textArea = reportDialogView.getTextArea();
- textArea.setText(message);
- reportDialogView.setSize(600, 400);
- reportDialogView.setTitle(title);
- reportDialogView.setLocationRelativeTo(parent);
- reportDialogView.setVisible(true);
- }
-
-
-}
1
0
r3429 - in trunk/lima-business-api: . src/main/java/org/chorem/lima/business
by echatellier@users.chorem.org 16 May '12
by echatellier@users.chorem.org 16 May '12
16 May '12
Author: echatellier
Date: 2012-05-16 16:25:36 +0200 (Wed, 16 May 2012)
New Revision: 3429
Url: http://chorem.org/repositories/revision/lima/3429
Log:
Declare exception as ApplicationException to not being imbricated into EJBException
Modified:
trunk/lima-business-api/pom.xml
trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java
Modified: trunk/lima-business-api/pom.xml
===================================================================
--- trunk/lima-business-api/pom.xml 2012-05-16 13:55:59 UTC (rev 3428)
+++ trunk/lima-business-api/pom.xml 2012-05-16 14:25:36 UTC (rev 3429)
@@ -21,6 +21,11 @@
<artifactId>lima-callao</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>javaee-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<!-- ************************************************************* -->
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-05-16 13:55:59 UTC (rev 3428)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java 2012-05-16 14:25:36 UTC (rev 3429)
@@ -25,6 +25,8 @@
package org.chorem.lima.business;
+import javax.ejb.ApplicationException;
+
/**
* Lima exception.
*
@@ -34,6 +36,7 @@
* Last update : $Date$
* By : $Author$
*/
+@ApplicationException
public class LimaException extends RuntimeException {
/**
1
0
Author: echatellier
Date: 2012-05-16 15:55:59 +0200 (Wed, 16 May 2012)
New Revision: 3428
Url: http://chorem.org/repositories/revision/lima/3428
Log:
Fix build
Added:
trunk/lima-business-api/src/license/
trunk/lima-business-api/src/license/THIRD-PARTY.properties
Modified:
trunk/lima-business-api/LICENSE.txt
trunk/lima-business/pom.xml
trunk/lima-business/src/license/THIRD-PARTY.properties
trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java
trunk/lima-business/src/main/java/org/chorem/lima/business/LimaDaoHelper.java
trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java
trunk/lima-business/src/test/java/org/chorem/lima/business/ImportServiceImplTest.java
trunk/lima-business/src/test/java/org/chorem/lima/entity/AccountDAOTest.java
trunk/lima-business/src/test/java/org/chorem/lima/entity/FinancialTransactionDAOTest.java
trunk/lima-callao/pom.xml
trunk/lima-swing/pom.xml
trunk/lima-swing/src/license/THIRD-PARTY.properties
trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.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/FinancialPeriodListRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AbstractHomePane.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/package-info.java
trunk/lima-swing/src/main/resources/META-INF/aop.xml
trunk/pom.xml
Modified: trunk/lima-business/pom.xml
===================================================================
--- trunk/lima-business/pom.xml 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/pom.xml 2012-05-16 13:55:59 UTC (rev 3428)
@@ -48,6 +48,10 @@
<artifactId>jetty-servlet</artifactId>
</dependency>
<dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
Modified: trunk/lima-business/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-business/src/license/THIRD-PARTY.properties 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/src/license/THIRD-PARTY.properties 2012-05-16 13:55:59 UTC (rev 3428)
@@ -2,17 +2,19 @@
#-------------------------------------------------------------------------------
# Already used licenses in project :
# - ANTLR 2 License
+# - Apache 2.0
+# - Apache License 2.0
# - Apache Software License - Version 2.0
-# - Apache Software License 2.0
# - BSD License
# - BSD style
+# - CDDL 1.1
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - CPL
-# - Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
# - Common Public License Version 1.0
# - Eclipse Public License - Version 1.0
+# - GPL2 w/ CPE
# - General Public License (GPL)
-# - HSQLDB License
+# - HSQLDB License, a BSD open source license
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Lesser General Public License (LGPL) v 3.0
# - Lesser General Public License (LPGL)
@@ -31,13 +33,9 @@
# Please fill the missing licenses for dependencies :
#
#
-#Wed Feb 22 11:37:51 CET 2012
+#Wed May 16 15:17:45 CEST 2012
antlr--antlr--2.7.6=ANTLR 2 License
-com.sun.xml.bind--jaxb-impl--2.1.9=Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
commons-net--commons-net--2.0=The Apache Software License, Version 2.0
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
dom4j--dom4j--1.6.1=jdomlicence
javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
-org.apache.geronimo.specs--geronimo-j2ee-management_1.0_spec--1.0=The Apache Software License, Version 2.0
-org.codehaus.swizzle--swizzle-stream--1.0.1=The Apache Software License, Version 2.0
-quartz--quartz--1.5.2=The Apache Software License, Version 2.0
Modified: trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaDaoHelper.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaDaoHelper.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaDaoHelper.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
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-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/src/test/java/org/chorem/lima/business/ImportServiceImplTest.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
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-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/src/test/java/org/chorem/lima/entity/AccountDAOTest.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-business/src/test/java/org/chorem/lima/entity/FinancialTransactionDAOTest.java
===================================================================
--- trunk/lima-business/src/test/java/org/chorem/lima/entity/FinancialTransactionDAOTest.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business/src/test/java/org/chorem/lima/entity/FinancialTransactionDAOTest.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-business-api/LICENSE.txt
===================================================================
--- trunk/lima-business-api/LICENSE.txt 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-business-api/LICENSE.txt 2012-05-16 13:55:59 UTC (rev 3428)
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Added: trunk/lima-business-api/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-business-api/src/license/THIRD-PARTY.properties (rev 0)
+++ trunk/lima-business-api/src/license/THIRD-PARTY.properties 2012-05-16 13:55:59 UTC (rev 3428)
@@ -0,0 +1,27 @@
+# Generated by org.codehaus.mojo.license.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - ANTLR 2 License
+# - BSD License
+# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+# - General Public License (GPL)
+# - Indiana University Extreme! Lab Software License, vesion 1.1.1
+# - Lesser General Public License (LGPL) v 3.0
+# - Lesser General Public License (LPGL)
+# - Lesser General Public License (LPGL) v 2.1
+# - License Agreement for Java Transaction API Classes
+# - MIT License
+# - MPL 1.1
+# - The Apache Software License, Version 2.0
+# - The H2 License, Version 1.0
+# - jdomlicence
+# - license.txt
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Wed May 16 15:17:32 CEST 2012
+antlr--antlr--2.7.6=ANTLR 2 License
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+dom4j--dom4j--1.6.1=jdomlicence
+javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
Modified: trunk/lima-callao/pom.xml
===================================================================
--- trunk/lima-callao/pom.xml 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-callao/pom.xml 2012-05-16 13:55:59 UTC (rev 3428)
@@ -24,14 +24,14 @@
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
<groupId>org.nuiton.topia</groupId>
<artifactId>topia-persistence</artifactId>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
Modified: trunk/lima-swing/pom.xml
===================================================================
--- trunk/lima-swing/pom.xml 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/pom.xml 2012-05-16 13:55:59 UTC (rev 3428)
@@ -240,7 +240,7 @@
</plugin>
<plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<configuration>
<gzip>true</gzip>
@@ -256,6 +256,14 @@
<include>org.swinglabs:jxlayer</include>
</includes>
</jnlpExtension>
+ <jnlpExtension>
+ <name>jetty</name>
+ <title>Jetty</title>
+ <vendor>IBM Corporation</vendor>
+ <includes>
+ <include>org.eclipse.jetty.orbit:javax.servlet</include>
+ </includes>
+ </jnlpExtension>
</jnlpExtensions>
</configuration>
</plugin>
@@ -280,7 +288,7 @@
<reporting>
<plugins>
<plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<version>${webstartPluginVersion}</version>
</plugin>
@@ -303,7 +311,7 @@
<!-- key store secrets availables -->
<plugin>
<groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
+ <artifactId>helper-maven-plugin</artifactId>
<executions>
<execution>
<id>get-keystore</id>
@@ -323,7 +331,7 @@
</plugin>
<!-- make webstart -->
<plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<executions>
<execution>
@@ -357,7 +365,7 @@
<plugin>
<groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
+ <artifactId>helper-maven-plugin</artifactId>
<executions>
<execution>
<id>get-keystore</id>
@@ -377,7 +385,7 @@
</plugin>
<plugin>
- <groupId>org.codehaus.mojo.webstart</groupId>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<executions>
<execution>
Modified: trunk/lima-swing/src/license/THIRD-PARTY.properties
===================================================================
--- trunk/lima-swing/src/license/THIRD-PARTY.properties 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/license/THIRD-PARTY.properties 2012-05-16 13:55:59 UTC (rev 3428)
@@ -2,20 +2,20 @@
#-------------------------------------------------------------------------------
# Already used licenses in project :
# - ANTLR 2 License
-# - Apache License Version 1.1
+# - Apache 2.0
+# - Apache License 2.0
# - Apache Software License - Version 2.0
-# - Apache Software License 2.0
# - BSD License
# - BSD style
-# - Bouncy Castle Licence
-# - Bouncy Castle License
+# - CDDL 1.1
# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
# - CPL
-# - Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
# - Common Public License Version 1.0
# - Eclipse Public License - Version 1.0
+# - Eclipse Public License - v 1.0
+# - GPL2 w/ CPE
# - General Public License (GPL)
-# - HSQLDB License
+# - HSQLDB License, a BSD open source license
# - Indiana University Extreme! Lab Software License, vesion 1.1.1
# - Lesser General Public License (LGPL)
# - Lesser General Public License (LGPL) v 3.0
@@ -31,13 +31,13 @@
# - http://asm.ow2.org/license.html
# - http://www.apache.org/licenses/LICENSE-2.0.txt
# - jdomlicence
+# - license.txt
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
-#Thu Sep 22 16:27:42 CEST 2011
+#Wed May 16 15:30:23 CEST 2012
antlr--antlr--2.7.6=ANTLR 2 License
-com.sun.xml.bind--jaxb-impl--2.1.9=Common Development and Distribution License (CDDL) v1.0 / GPLv2 + classpath exception dual license
commons-jxpath--commons-jxpath--1.3=The Apache Software License, Version 2.0
commons-net--commons-net--2.0=The Apache Software License, Version 2.0
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
@@ -45,6 +45,3 @@
javax.mail--mail--1.4.1=License Agreement for JavaMail(TM) API
javax.transaction--jta--1.1=License Agreement for Java Transaction API Classes
org.apache.commons--commons-email--1.2=The Apache Software License, Version 2.0
-org.apache.geronimo.specs--geronimo-j2ee-management_1.0_spec--1.0=The Apache Software License, Version 2.0
-org.codehaus.swizzle--swizzle-stream--1.0.1=The Apache Software License, Version 2.0
-quartz--quartz--1.5.2=The Apache Software License, Version 2.0
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/BetaLayerUI.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableModel.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountTreeTableRenderer.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookListRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookListRenderer.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/EntryBookListRenderer.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: 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 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialPeriodListRenderer.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: 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 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FiscalPeriodListRenderer.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: 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 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: 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 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AbstractHomePane.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AbstractHomePane.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/AbstractHomePane.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/home/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/opening/package-info.java 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,25 +1,23 @@
/*
* #%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
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
/**
Modified: trunk/lima-swing/src/main/resources/META-INF/aop.xml
===================================================================
--- trunk/lima-swing/src/main/resources/META-INF/aop.xml 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/lima-swing/src/main/resources/META-INF/aop.xml 2012-05-16 13:55:59 UTC (rev 3428)
@@ -1,3 +1,27 @@
+<!--
+ #%L
+ Lima :: Swing
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2008 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
<!DOCTYPE aspectj PUBLIC
"-//AspectJ//DTD//EN"
"http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-05-16 13:07:26 UTC (rev 3427)
+++ trunk/pom.xml 2012-05-16 13:55:59 UTC (rev 3428)
@@ -211,6 +211,12 @@
<version>8.1.3.v20120416</version>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>8.1.3.v20120416</version>
+ </dependency>
+
<!-- pdfbox to create pdf document -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
1
0
r3427 - trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports
by echatellier@users.chorem.org 16 May '12
by echatellier@users.chorem.org 16 May '12
16 May '12
Author: echatellier
Date: 2012-05-16 15:07:26 +0200 (Wed, 16 May 2012)
New Revision: 3427
Url: http://chorem.org/repositories/revision/lima/3427
Log:
Add javadoc
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java 2012-05-16 13:07:26 UTC (rev 3427)
@@ -0,0 +1,28 @@
+/*
+ * #%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%
+ */
+/**
+ * Rapport - Edition journal.
+ */
+package org.chorem.lima.ui.entrybooksreports;
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
Author: echatellier
Date: 2012-05-16 15:02:27 +0200 (Wed, 16 May 2012)
New Revision: 3426
Url: http://chorem.org/repositories/revision/lima/3426
Log:
Move LimaException to Runtime. Delete LimaRuntimeException.
Removed:
trunk/lima-business/src/main/java/org/chorem/lima/business/LimaRuntimeException.java
Modified:
trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.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/EntryBooksReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java
Deleted: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaRuntimeException.java
===================================================================
--- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaRuntimeException.java 2012-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaRuntimeException.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -1,60 +0,0 @@
-/*
- * #%L
- * Lima business
- *
- * $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.business;
-
-/**
- * Lima runtime exception.
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class LimaRuntimeException extends RuntimeException {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = -6876236663940184462L;
-
- /**
- * Constructs a new exception with the specified detail message.
- *
- * @param message message
- */
- public LimaRuntimeException(String message) {
- super(message);
- }
-
- /**
- * Constructs a new exception with the specified detail message and cause.
- *
- * @param message message
- * @param cause cause
- */
- public LimaRuntimeException(String message, Throwable cause) {
- super(message, cause);
- }
-}
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/LimaException.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -34,7 +34,7 @@
* Last update : $Date$
* By : $Author$
*/
-public class LimaException extends Exception {
+public class LimaException extends RuntimeException {
/**
* serialVersionUID.
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/MainViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -45,7 +45,6 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
import org.chorem.lima.LimaContext;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.api.HttpServerService;
import org.chorem.lima.enums.ImportExportEnum;
import org.chorem.lima.service.LimaServiceFactory;
@@ -196,7 +195,7 @@
try {
DesktopUtil.browse(siteURL.toURI());
} catch (Exception e) {
- throw new LimaRuntimeException("Can't open lima website at " + siteURL, e);
+ throw new RuntimeException("Can't open lima website at " + siteURL, e);
}
}
@@ -450,11 +449,7 @@
String address = LimaConfig.getInstance().getHostAdress();
String url = "http://" + address + ":" + port + "/";
- try {
- SwingUtil.openLink(url);
- } catch (Exception e) {
- throw new LimaRuntimeException("Can't open lima website at " + url, e);
- }
+ SwingUtil.openLink(url);
}
/**
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -46,8 +46,6 @@
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.AccountService;
import org.chorem.lima.business.api.ImportService;
@@ -152,45 +150,41 @@
* Load all accounts from service and display it into tree table.
*/
protected void loadAllAccounts() {
- try {
- // default data load
- List<Account> accounts = accountService.getAllAccounts();
- Collections.sort(accounts, accountLengthComparator);
- if (log.isDebugEnabled()) {
- log.debug(String.format("Loaded %d accounts from service", accounts.size()));
- }
+ // default data load
+ List<Account> accounts = accountService.getAllAccounts();
+ Collections.sort(accounts, accountLengthComparator);
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Loaded %d accounts from service", accounts.size()));
+ }
- // render in tree node hierarchy for DefaultTreeTableModel
- SortedMap<String, DefaultMutableTreeTableNode> nodeCache = new TreeMap<String, DefaultMutableTreeTableNode>(reverseAccountLengthComparator);
- DefaultMutableTreeTableNode root = new DefaultMutableTreeTableNode(null);
- for (Account account : accounts) {
- // find parent
- DefaultMutableTreeTableNode parentNode = root;
- Iterator<Map.Entry<String, DefaultMutableTreeTableNode>> itNodes = nodeCache.entrySet().iterator();
- while (itNodes.hasNext()) {
- Map.Entry<String, DefaultMutableTreeTableNode> entry = itNodes.next();
- String accountNumber = entry.getKey();
- if (account.getAccountNumber().startsWith(accountNumber)) {
- parentNode = entry.getValue();
- break;
- }
+ // render in tree node hierarchy for DefaultTreeTableModel
+ SortedMap<String, DefaultMutableTreeTableNode> nodeCache = new TreeMap<String, DefaultMutableTreeTableNode>(reverseAccountLengthComparator);
+ DefaultMutableTreeTableNode root = new DefaultMutableTreeTableNode(null);
+ for (Account account : accounts) {
+ // find parent
+ DefaultMutableTreeTableNode parentNode = root;
+ Iterator<Map.Entry<String, DefaultMutableTreeTableNode>> itNodes = nodeCache.entrySet().iterator();
+ while (itNodes.hasNext()) {
+ Map.Entry<String, DefaultMutableTreeTableNode> entry = itNodes.next();
+ String accountNumber = entry.getKey();
+ if (account.getAccountNumber().startsWith(accountNumber)) {
+ parentNode = entry.getValue();
+ break;
}
-
- // make current node
- DefaultMutableTreeTableNode node = new DefaultMutableTreeTableNode(account);
- parentNode.add(node);
-
- nodeCache.put(account.getAccountNumber(), node);
}
- // refreshing tree's model
- DefaultTreeTableModel model = new AccountTreeTableModel(root);
- model.setColumnIdentifiers(Arrays.asList(_("lima.table.number"), _("lima.table.label")));
- JXTreeTable table = view.getAccountsTreeTable();
- table.setTreeTableModel(model);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't load accounts from service");
+ // make current node
+ DefaultMutableTreeTableNode node = new DefaultMutableTreeTableNode(account);
+ parentNode.add(node);
+
+ nodeCache.put(account.getAccountNumber(), node);
}
+
+ // refreshing tree's model
+ DefaultTreeTableModel model = new AccountTreeTableModel(root);
+ model.setColumnIdentifiers(Arrays.asList(_("lima.table.number"), _("lima.table.label")));
+ JXTreeTable table = view.getAccountsTreeTable();
+ table.setTreeTableModel(model);
}
/**
@@ -208,8 +202,8 @@
* @param dialog the account form
*/
public void addAccount(AccountForm dialog) {
- try {
+ try {
Account newAccount = dialog.getAccount();
newAccount = accountService.createAccount(newAccount);
@@ -227,8 +221,6 @@
model.insertNodeInto(newNode, node, node.getChildCount());
treeTable.expandPath(new TreePath(model.getPathToRoot(node)));
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't add account", ex);
} finally {
dialog.dispose();
}
@@ -320,10 +312,7 @@
//lastPathComponent.setUserObject(account);
model.valueForPathChanged(treePath, account);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't update account", ex);
} finally {
-
// close dialog
dialog.dispose();
}
@@ -347,22 +336,18 @@
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
- try {
- accountService.removeAccount(account);
+ accountService.removeAccount(account);
- // add all sub accounts to parent
- DefaultTreeTableModel model = (DefaultTreeTableModel)treeTable.getTreeTableModel();
- MutableTreeTableNode parent = (MutableTreeTableNode)lastNode.getParent();
- for (int childIndex = lastNode.getChildCount() -1 ; childIndex >= 0 ; childIndex--) {
- MutableTreeTableNode child = (MutableTreeTableNode)lastNode.getChildAt(childIndex);
- model.insertNodeInto(child, parent, parent.getChildCount());
- }
-
- // remove node
- model.removeNodeFromParent(lastNode);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't remove account", ex);
+ // add all sub accounts to parent
+ DefaultTreeTableModel model = (DefaultTreeTableModel)treeTable.getTreeTableModel();
+ MutableTreeTableNode parent = (MutableTreeTableNode)lastNode.getParent();
+ for (int childIndex = lastNode.getChildCount() -1 ; childIndex >= 0 ; childIndex--) {
+ MutableTreeTableNode child = (MutableTreeTableNode)lastNode.getChildAt(childIndex);
+ model.insertNodeInto(child, parent, parent.getChildCount());
}
+
+ // remove node
+ model.removeNodeFromParent(lastNode);
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2012-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/balance/BalanceViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -33,7 +33,6 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -43,8 +42,6 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
import org.chorem.lima.beans.BalanceTrial;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.api.FiscalPeriodService;
@@ -56,7 +53,6 @@
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.service.LimaServiceFactory;
-
/**
* Handler associated with accounts reports view.
* By : $Author$
@@ -126,13 +122,7 @@
* @return
*/
public BalanceTrial getDataList() {
- BalanceTrial results = null;
-
- try {
- results = reportService.generateBalanceTrial(selectedBeginDate, selectedEndDate, selectedAccounts, false, view.getMovmentedFilter().isSelected());
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.balance.listerror"), eee);
- }
+ BalanceTrial results = reportService.generateBalanceTrial(selectedBeginDate, selectedEndDate, selectedAccounts, false, view.getMovmentedFilter().isSelected());
return results;
}
@@ -178,12 +168,7 @@
if (selectedBeginDate != null & selectedEndDate != null) {
//looks for all blocked fiscal periods
- List<FiscalPeriod> blockedFiscalPeriods = new ArrayList<FiscalPeriod>();
- try {
- blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.balance.documentcreationerror"), eee);
- }
+ List<FiscalPeriod> blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
//tells if the fiscaPeriod as been found and is blocked
boolean error = true;
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybook/EntryBookViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -33,8 +33,6 @@
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.EntryBookService;
import org.chorem.lima.business.api.ImportService;
@@ -77,19 +75,15 @@
* Load all available entry book into table.
*/
protected void loadAllEntryBooks() {
-
- try {
- List<EntryBook> entryBooks = entryBookService.getAllEntryBooks();
- if (log.isDebugEnabled()) {
- log.debug(String.format("Loaded %d entry books from service", entryBooks.size()));
- }
-
- EntryBookTableModel model = new EntryBookTableModel(entryBooks);
- EntryBookTable table = view.getEntryBooksTable();
- table.setModel(model);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't load entry books", ex);
+
+ List<EntryBook> entryBooks = entryBookService.getAllEntryBooks();
+ if (log.isDebugEnabled()) {
+ log.debug(String.format("Loaded %d entry books from service", entryBooks.size()));
}
+
+ EntryBookTableModel model = new EntryBookTableModel(entryBooks);
+ EntryBookTable table = view.getEntryBooksTable();
+ table.setModel(model);
}
/**
@@ -107,17 +101,13 @@
// null == cancel action
if (newEntryBook != null) {
- try {
- // service call
- newEntryBook = entryBookService.createEntryBook(newEntryBook);
-
- // ui refresh
- JXTable entryBookTable = view.getEntryBooksTable();
- EntryBookTableModel entryBookTableModel = (EntryBookTableModel) entryBookTable.getModel();
- entryBookTableModel.addEntryBook(newEntryBook);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't add entry book", ex);
- }
+ // service call
+ newEntryBook = entryBookService.createEntryBook(newEntryBook);
+
+ // ui refresh
+ JXTable entryBookTable = view.getEntryBooksTable();
+ EntryBookTableModel entryBookTableModel = (EntryBookTableModel) entryBookTable.getModel();
+ entryBookTableModel.addEntryBook(newEntryBook);
}
}
@@ -140,15 +130,11 @@
// null == cancel action
selectedEntryBook = entryBookForm.getEntryBook();
if (selectedEntryBook != null) {
- try {
- // service call
- selectedEntryBook = entryBookService.updateEntryBook(selectedEntryBook);
+ // service call
+ selectedEntryBook = entryBookService.updateEntryBook(selectedEntryBook);
- // ui refresh
- entryBookTableModel.updateEntryBook(selectedEntryBook);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't update entry book", ex);
- }
+ // ui refresh
+ entryBookTableModel.updateEntryBook(selectedEntryBook);
}
}
@@ -168,13 +154,9 @@
JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.YES_OPTION) {
-
- try {
- entryBookService.removeEntryBook(selectedEntryBook);
- entryBookTableModel.removeEntryBook(selectedEntryBook);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't delete entry book", ex);
- }
+
+ entryBookService.removeEntryBook(selectedEntryBook);
+ entryBookTableModel.removeEntryBook(selectedEntryBook);
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2012-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -33,7 +33,6 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -43,8 +42,6 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
import org.chorem.lima.beans.ReportsDatas;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.DocumentService;
import org.chorem.lima.business.api.FinancialTransactionService;
@@ -124,13 +121,8 @@
public ReportsDatas getDataList() {
ReportsDatas results = null;
if (selectedEntryBook != null) {
- try {
- results =
- reportService.generateEntryBooksReports(
- selectedEntryBook, selectedBeginDate, selectedEndDate);
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.entrybooksreports.listerror"), eee);
- }
+ results = reportService.generateEntryBooksReports(
+ selectedEntryBook, selectedBeginDate, selectedEndDate);
}
return results;
}
@@ -177,12 +169,7 @@
if (selectedBeginDate != null && selectedEndDate != null) {
//looks for all blocked fiscal periods
- List<FiscalPeriod> blockedFiscalPeriods = new ArrayList<FiscalPeriod>();
- try {
- blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.entrybooksreports.documentcreationerror"), eee);
- }
+ List<FiscalPeriod> blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
//tells if the fiscaPeriod as been found and is blocked
boolean error = true;
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -35,7 +35,6 @@
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;
@@ -74,20 +73,17 @@
* 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);
+ // 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);
}
/**
@@ -99,18 +95,14 @@
FinancialPeriodTableModel model = (FinancialPeriodTableModel) view.getFinancialPeriodTable().getModel();
// blocked it
- try {
- 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);
+ 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) {
- financialPeriodService.blockClosedPeriodicEntryBook(closedPeriodicEntryBook);
- model.fireTableRowsUpdated(selectedRow, selectedRow);
- }
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't block financialperiod", eee);
+ if (response == JOptionPane.YES_OPTION) {
+ financialPeriodService.blockClosedPeriodicEntryBook(closedPeriodicEntryBook);
+ model.fireTableRowsUpdated(selectedRow, selectedRow);
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -32,9 +32,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaBusinessException;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialStatementService;
import org.chorem.lima.business.api.ImportService;
@@ -104,17 +101,7 @@
}
// add it
- try {
- treeTableModel.addFinancialStatement(treePath, newFinancialStatementHeader);
- } catch (LimaBusinessException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't add financialStatementHeader", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
-
- } catch (LimaException ex) {
- throw new LimaRuntimeException(_("lima.financialstatement.addfinancialStatementHeadererror"), ex);
- }
+ treeTableModel.addFinancialStatement(treePath, newFinancialStatementHeader);
}
}
@@ -141,20 +128,7 @@
int selectedRow = view.treeTable.getSelectedRow();
treePath = view.treeTable.getPathForRow(selectedRow);
// add it
- try {
- treeTableModel.
- addFinancialStatement(treePath, newFinancialStatementMovement);
- } catch (LimaBusinessException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't add FinancialStatementMovement", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't add FinancialStatementMovement", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
- }
+ treeTableModel.addFinancialStatement(treePath, newFinancialStatementMovement);
}
}
@@ -208,15 +182,7 @@
//if action confirmed
if (financialStatement != null) {
// update it
- try {
- treeTableModel.updateFinancialStatement(
- treePath, financialStatement);
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't add update", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
- }
+ treeTableModel.updateFinancialStatement(treePath, financialStatement);
}
}
}
@@ -241,15 +207,7 @@
FinancialStatement financialStatement =
(FinancialStatement) treePath.getLastPathComponent();
- try {
- treeTableModel.removeFinancialStatementObject(
- treePath, financialStatement);
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't delete account", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
- }
+ treeTableModel.removeFinancialStatementObject(treePath, financialStatement);
}
}
}
@@ -258,13 +216,7 @@
JXTreeTable treeTable = view.getTreeTable();
FinancialStatementChartTreeTableModel treeTableModel =
(FinancialStatementChartTreeTableModel) treeTable.getTreeTableModel();
- try {
- treeTableModel.refreshTree();
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't refresh model", eee);
- }
- }
+ treeTableModel.refreshTree();
//refresh view
view.repaint();
}
@@ -279,14 +231,7 @@
// if action confirmed
if (value != null) {
if (form.getDeleteFinancialStatementChart().isSelected()) {
- try {
- financialStatementService.removeAllFinancialStatement();
-
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't delete financial statement chart", eee);
- }
- }
+ financialStatementService.removeAllFinancialStatement();
}
FinancialStatementsChartEnum defaultFinancialStatementsEnum =
(FinancialStatementsChartEnum) value;
@@ -298,15 +243,8 @@
public void financialStatementChartCheck() {
- String result;
- try {
- result = financialStatementService.checkFinancialStatementChart();
- DialogHelper.showReportDialog(result, _("lima.financialstatement.check"), view);
-
- } catch (LimaException e) {
- log.error("Can't check financialstatement chart", e);
- }
-
+ String result = financialStatementService.checkFinancialStatementChart();
+ DialogHelper.showReportDialog(result, _("lima.financialstatement.check"), view);
}
@Override
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportTableModel.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -42,8 +42,6 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.LimaConfig;
import org.chorem.lima.beans.FinancialStatementAmounts;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.DocumentService;
import org.chorem.lima.business.api.FinancialStatementService;
@@ -246,18 +244,14 @@
}
/**
- * get all account fot the selected period
+ * get all account for the selected period
*
* @return
*/
public List<FinancialStatementAmounts> getDataList() {
List<FinancialStatementAmounts> results = null;
if (selectedBeginDate != null && selectedEndDate != null) {
- try {
- results = financialStatementService.financialStatementReport(selectedBeginDate, selectedEndDate);
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.financialstatementreport.listerror"), eee);
- }
+ results = financialStatementService.financialStatementReport(selectedBeginDate, selectedEndDate);
}
return results;
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2012-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementreport/FinancialStatementReportViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -27,7 +27,6 @@
import static org.nuiton.i18n.I18n._;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -35,8 +34,6 @@
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.api.FiscalPeriodService;
import org.chorem.lima.business.utils.FormatsEnum;
import org.chorem.lima.entity.FiscalPeriod;
@@ -86,12 +83,7 @@
if (selectedBeginDate != null && selectedEndDate != null) {
//looks for all blocked fiscal periods
- List<FiscalPeriod> blockedFiscalPeriods = new ArrayList<FiscalPeriod>();
- try {
- blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Enable to create document ", eee);
- }
+ List<FiscalPeriod> blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
//tells if the fiscaPeriod as been found and is blocked
boolean error = true;
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTableModel.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -33,8 +33,6 @@
import javax.swing.table.AbstractTableModel;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.entity.Account;
import org.chorem.lima.entity.Entry;
@@ -298,132 +296,127 @@
@Override
public void setValueAt(Object value, int row, int column) {
- try {
- Object currentRow = transactionAndEntries.get(row);
+ Object currentRow = transactionAndEntries.get(row);
- FinancialTransaction currentFinancialTransaction = null;
- if (currentRow instanceof FinancialTransaction) {
- currentFinancialTransaction = (FinancialTransaction) currentRow;
- switch (column) {
- case 0:
- //update
- currentFinancialTransaction.setTransactionDate((Date) value);
- break;
- case 1:
- // FIXME echatellier 20120515 je ne comprend pas pourquoi
- // il n'est pas possible de changer le journal si la transaction
- // a des entrées
- // update : autorisation si le journal est null au moins
- if (currentFinancialTransaction.getEntry() != null
- && currentFinancialTransaction.getEntryBook() != null) {
- // not authorized to change the value
- return;
+ FinancialTransaction currentFinancialTransaction = null;
+ if (currentRow instanceof FinancialTransaction) {
+ currentFinancialTransaction = (FinancialTransaction) currentRow;
+ switch (column) {
+ case 0:
+ //update
+ currentFinancialTransaction.setTransactionDate((Date) value);
+ break;
+ case 1:
+ // FIXME echatellier 20120515 je ne comprend pas pourquoi
+ // il n'est pas possible de changer le journal si la transaction
+ // a des entrées
+ // update : autorisation si le journal est null au moins
+ if (currentFinancialTransaction.getEntry() != null
+ && currentFinancialTransaction.getEntryBook() != null) {
+ // not authorized to change the value
+ return;
+ }
+ currentFinancialTransaction.setEntryBook((EntryBook) value);
+ break;
+ }
+
+ // update transaction
+ financialTransactionService.updateFinancialTransaction(currentFinancialTransaction);
+
+ } else if (currentRow instanceof Entry) {
+ Entry currentEntry = (Entry) currentRow;
+ currentFinancialTransaction = currentEntry.getFinancialTransaction();
+ boolean updateTransaction = false;
+ 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 : currentFinancialTransaction.getEntry()) {
+ entry.setVoucher(voucher);
}
- currentFinancialTransaction.setEntryBook((EntryBook) value);
- break;
- }
-
- // update transaction
- financialTransactionService.updateFinancialTransaction(currentFinancialTransaction);
-
- } else if (currentRow instanceof Entry) {
- Entry currentEntry = (Entry) currentRow;
- currentFinancialTransaction = currentEntry.getFinancialTransaction();
- boolean updateTransaction = false;
- 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 : currentFinancialTransaction.getEntry()) {
- entry.setVoucher(voucher);
- }
- updateTransaction = true;
- } else {
-
- // not on first row, just update this entry voucher
- currentEntry.setVoucher(voucher);
+ updateTransaction = true;
+ } else {
+
+ // not on first row, just update this entry voucher
+ currentEntry.setVoucher(voucher);
+ }
+ break;
+ case 3:
+ Account account = (Account) value;
+ currentEntry.setAccount(account);
+ // let's copy the account description
+ String description1 = account.getLabel();
+ firstEntryRow = getFirstEntry(row);
+ if (row == firstEntryRow) {
+ // let's update the description of all entries of
+ // the transaction
+
+ for (Entry entry : currentFinancialTransaction.getEntry()) {
+ entry.setDescription(description1);
}
- break;
- case 3:
- Account account = (Account) value;
- currentEntry.setAccount(account);
- // let's copy the account description
- String description1 = account.getLabel();
- firstEntryRow = getFirstEntry(row);
- if (row == firstEntryRow) {
- // let's update the description of all entries of
- // the transaction
-
- for (Entry entry : currentFinancialTransaction.getEntry()) {
- entry.setDescription(description1);
- }
- updateTransaction = true;
- } else {
- // not on first row, just update this entry description
- currentEntry.setDescription(description1);
+ updateTransaction = true;
+ } else {
+ // not on first row, just update this entry description
+ currentEntry.setDescription(description1);
+ }
+ break;
+ case 4:
+ 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 : currentFinancialTransaction.getEntry()) {
+ entry.setDescription(description);
}
- break;
- case 4:
- 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 : currentFinancialTransaction.getEntry()) {
- entry.setDescription(description);
- }
- updateTransaction = true;
- } else {
-
- // not on first row, just update this entry description
- currentEntry.setDescription(description);
- }
- break;
- case 5:
- currentEntry.setLettering((String) value);
- break;
- case 6:
- currentEntry.setAmount((BigDecimal) value);
- currentEntry.setDebit(true);
- break;
- case 7:
- currentEntry.setAmount((BigDecimal) value);
- 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 : currentFinancialTransaction.getEntry()) {
- financialTransactionService.updateEntry(entry);
+ updateTransaction = true;
+ } else {
+
+ // not on first row, just update this entry description
+ currentEntry.setDescription(description);
}
- } else {
- financialTransactionService.updateEntry(currentEntry);
+ break;
+ case 5:
+ currentEntry.setLettering((String) value);
+ break;
+ case 6:
+ currentEntry.setAmount((BigDecimal) value);
+ currentEntry.setDebit(true);
+ break;
+ case 7:
+ currentEntry.setAmount((BigDecimal) value);
+ 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 : currentFinancialTransaction.getEntry()) {
+ financialTransactionService.updateEntry(entry);
}
+ } else {
+ financialTransactionService.updateEntry(currentEntry);
}
-
- // FIXME echatellier 20120413 une modification des dates fait que l'ordre
- // devient faux
- int trIndex = indexOf(currentFinancialTransaction);
- int endIndex = trIndex;
- if (currentFinancialTransaction.getEntry() != null) {
- endIndex += currentFinancialTransaction.getEntry().size();
- }
- fireTableRowsUpdated(trIndex, endIndex);
+ }
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't propagate data modification to service", ex);
+ // FIXME echatellier 20120413 une modification des dates fait que l'ordre
+ // devient faux
+ int trIndex = indexOf(currentFinancialTransaction);
+ int endIndex = trIndex;
+ if (currentFinancialTransaction.getEntry() != null) {
+ endIndex += currentFinancialTransaction.getEntry().size();
}
+ fireTableRowsUpdated(trIndex, endIndex);
}
public Object getElementAt(int row) {
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -41,8 +41,6 @@
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.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.EntryBookService;
import org.chorem.lima.business.api.FinancialPeriodService;
@@ -100,26 +98,23 @@
* 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);
+ // 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()));
+ }
}
/**
@@ -131,20 +126,16 @@
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);
+ 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();
}
}
@@ -185,27 +176,23 @@
return;
}
- try {
- 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);
+ 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);
}
/**
@@ -226,18 +213,14 @@
FinancialTransactionTable table = view.getFinancialTransactionTable();
if (clipBoard instanceof Entry) {
- try {
- int index = addEntry((Entry) clipBoard, indexSelectedRow);
+ 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) {
- throw new LimaRuntimeException("Can't past entry", 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();
}
}
@@ -245,9 +228,8 @@
* @param entry
* @param row
* @return int: indexOf new Entry
- * @throws LimaException
*/
- protected int addEntry(Entry entry, int row) throws LimaException {
+ protected int addEntry(Entry entry, int row) {
FinancialTransactionTableModel tableModel = view.getFinancialTransactionTableModel();
FinancialTransaction currentTransaction = null;
int financialTransactionRow = 0;
@@ -285,25 +267,19 @@
FinancialTransactionTable table = view.getFinancialTransactionTable();
ListSelectionModel selectionModel = table.getSelectionModel();
- try {
- addFinancialTransaction2();
- //select the new line
- int numberRow = table.getRowCount();
- selectionModel.setSelectionInterval(numberRow - 1, numberRow - 1);
- //focus on first column
- table.changeSelection(numberRow, 0, false, false);
- table.scrollCellToVisible(numberRow, 0);
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't add financialtransaction", eee);
- }
+ addFinancialTransaction2();
+ //select the new line
+ int numberRow = table.getRowCount();
+ selectionModel.setSelectionInterval(numberRow - 1, numberRow - 1);
+ //focus on first column
+ table.changeSelection(numberRow, 0, false, false);
+ table.scrollCellToVisible(numberRow, 0);
}
/**
* Add new transaction after calling service.
- *
- * @throws LimaException
*/
- public void addFinancialTransaction2() throws LimaException {
+ public void addFinancialTransaction2() {
FinancialPeriod financialPeriod = (FinancialPeriod)view.getFinancialPeriodComboBox().getSelectedItem();
EntryBook entryBook = (EntryBook)view.getEntryBookComboBox().getSelectedItem();
@@ -366,40 +342,36 @@
defaultDescription = (String) tableModel.getValueAt(firstentryBookrow, 4);
}
- try {
- // creates the new entry
- Entry entry = new EntryImpl();
- entry.setVoucher(defaultVoucher);
- entry.setDescription(defaultDescription);
- // 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);
+ // creates the new entry
+ Entry entry = new EntryImpl();
+ entry.setVoucher(defaultVoucher);
+ entry.setDescription(defaultDescription);
+ // 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);
- // add it in ui
- int addIndex = tableModel.indexOf(currentTransaction) +
- currentTransaction.getEntry().size();
- tableModel.addRow(newEntry, addIndex);
+ // add it in ui
+ int addIndex = tableModel.indexOf(currentTransaction) +
+ currentTransaction.getEntry().size();
+ tableModel.addRow(newEntry, addIndex);
- //select the new line
- ListSelectionModel selectionModel = table.getSelectionModel();
- selectionModel.setSelectionInterval(
- addIndex, addIndex);
- table.changeSelection(addIndex, 1, false, false);
+ //select the new line
+ ListSelectionModel selectionModel = table.getSelectionModel();
+ selectionModel.setSelectionInterval(
+ addIndex, addIndex);
+ table.changeSelection(addIndex, 1, false, false);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't add emptyentry", ex);
- }
} else {
if (log.isWarnEnabled()) {
log.warn("Call addentry selected transaction without selection");
@@ -434,25 +406,21 @@
}
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);
- currentEntry.getFinancialTransaction().removeEntry(currentEntry);
- }
- tableModel.deleteRow(indexSelectedRow);
-
- //select the upper line
- ListSelectionModel selectionModel = table.getSelectionModel();
- selectionModel.setSelectionInterval(indexSelectedRow - 1, indexSelectedRow - 1);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't remove transaction or entry", ex);
+ if (selectedValue instanceof FinancialTransaction) {
+ FinancialTransaction currentTransaction =
+ (FinancialTransaction) selectedValue;
+ financialTransactionService.removeFinancialTransaction(currentTransaction);
+
+ } else if (selectedValue instanceof Entry) {
+ Entry currentEntry = (Entry) selectedValue;
+ financialTransactionService.removeEntry(currentEntry);
+ currentEntry.getFinancialTransaction().removeEntry(currentEntry);
}
+ tableModel.deleteRow(indexSelectedRow);
+
+ //select the upper line
+ ListSelectionModel selectionModel = table.getSelectionModel();
+ selectionModel.setSelectionInterval(indexSelectedRow - 1, indexSelectedRow - 1);
}
} else {
if (log.isWarnEnabled()) {
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/FinancialTransactionSearchTableModel.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -38,9 +38,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.beans.FinancialTransactionSearch;
-import org.chorem.lima.business.LimaBusinessException;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialPeriodService;
import org.chorem.lima.business.api.FinancialTransactionService;
@@ -53,7 +50,6 @@
import org.chorem.lima.entity.FinancialTransactionImpl;
import org.chorem.lima.entity.FiscalPeriod;
import org.chorem.lima.service.LimaServiceFactory;
-import org.chorem.lima.util.DialogHelper;
/**
* Basic transaction table model.
@@ -120,11 +116,8 @@
|| financialTransactionSearch.getAccount() != null || financialTransactionSearch.getEntryBook() != null
|| financialTransactionSearch.getAmount() != null && financialTransactionSearch.getOperator() != null
|| financialTransactionSearch.getAmount() != null && financialTransactionSearch.getAmount2() != null)) {
- try {
- results = financialTransactionService.searchFinancialTransaction(financialTransactionSearch);
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't get transaction list", eee);
- }
+
+ results = financialTransactionService.searchFinancialTransaction(financialTransactionSearch);
}
return results;
@@ -347,23 +340,18 @@
/**
* @return int: indexOf new FianancialTransaction
- * @throws LimaException
*/
- public int addFinancialTransaction() throws LimaException {
+ public int addFinancialTransaction() {
/* Calling transaction service */
FinancialTransaction financialTransaction = new FinancialTransactionImpl();
+ int index = -1;
//if a period is selected
if (selectedFiscalPeriod != null) {
List<FinancialPeriod> financialPeriodsList =
financialPeriodService.getFinancialPeriods(selectedFiscalPeriod.getBeginDate(),
selectedFiscalPeriod.getEndDate());
- FinancialPeriod financialPeriod;
- if (financialPeriodsList != null) {
- financialPeriod = financialPeriodsList.get(0);
- } else {
- throw new LimaException("Can't set new transaction");
- }
+ FinancialPeriod financialPeriod = financialPeriodsList.get(0);
//financialTransaction.setSelectedFinancialPeriod(selectedFiscalPeriod);
// get today
@@ -396,22 +384,19 @@
//on recharge la liste
cacheDataList = getDataList(financialTransactionSearch);
- int row = cacheDataList.indexOf(fTransaction);
- fireTableRowsInserted(row, row);
- return row;
+ index = cacheDataList.indexOf(fTransaction);
+ fireTableRowsInserted(index, index);
//fireTableDataChanged();
- } else {
- throw new LimaBusinessException("No financial period selected");
}
+ return index;
}
/**
* @param value
* @param row
* @return int: indexOf new Entry
- * @throws LimaException
*/
- public int addEmptyEntry(Object value, int row) throws LimaException {
+ public int addEmptyEntry(Object value, int row) {
FinancialTransaction currentTransaction = null;
Object currentRow = cacheDataList.get(row);
Entry entry = new EntryImpl();
@@ -453,15 +438,8 @@
break;
}
// notify service for modification
- try {
- financialTransactionService.
+ financialTransactionService.
updateFinancialTransaction(currentFinancialTransaction);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't update financial transaction", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
- }
//update the financial transaction in entire
financialTransactionRow =
cacheDataList.indexOf(currentRow);
@@ -489,14 +467,9 @@
currentEntry.setLettering((String) value);
break;
}
- try {
- financialTransactionService.updateEntry(currentEntry);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.debug("Can't update entry", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
- }
+
+ financialTransactionService.updateEntry(currentEntry);
+
//update the financial transaction in entire
financialTransactionRow =
cacheDataList.indexOf(((Entry) currentRow).
@@ -520,9 +493,8 @@
*
* @param object
* @param row
- * @throws LimaException
*/
- public void removeObject(Object object, int row) throws LimaException {
+ public void removeObject(Object object, int row) {
Object currentRow = cacheDataList.get(row);
if (currentRow instanceof FinancialTransaction) {
FinancialTransaction currentTransaction =
@@ -542,9 +514,8 @@
* @param description
* @param row
* @return int: indexOf new Entry
- * @throws LimaException
*/
- public int addEmptyEntry(Object value, String description, int row) throws LimaException {
+ public int addEmptyEntry(Object value, String description, int row) {
FinancialTransaction currentTransaction = null;
Object currentRow = cacheDataList.get(row);
Entry entry = new EntryImpl();
@@ -576,9 +547,8 @@
* @param entry
* @param row
* @return int: indexOf new Entry
- * @throws LimaException
*/
- public int addEntry(Object value, Entry entry, int row) throws LimaException {
+ public int addEntry(Object value, Entry entry, int row) {
FinancialTransaction currentTransaction = null;
int financialTransactionRow = 0;
Object currentRow = cacheDataList.get(row);
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedTableModel.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -37,8 +37,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.utils.EntryComparator;
@@ -105,17 +103,13 @@
protected List<Object> getDataList() {
List<Object> results = new ArrayList<Object>();
if (selectedFiscalPeriod != null) {
- try {
- List<FinancialTransaction> financialtransactions =
- financialTransactionService.getAllInexactFinancialTransactions(selectedFiscalPeriod);
- for (FinancialTransaction financialtransaction : financialtransactions) {
- results.add(financialtransaction);
- List<Entry> entries = (List<Entry>) financialtransaction.getEntry();
- Collections.sort(entries, new EntryComparator());
- results.addAll(entries);
- }
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't get transaction list", eee);
+ List<FinancialTransaction> financialtransactions =
+ financialTransactionService.getAllInexactFinancialTransactions(selectedFiscalPeriod);
+ for (FinancialTransaction financialtransaction : financialtransactions) {
+ results.add(financialtransaction);
+ List<Entry> entries = (List<Entry>) financialtransaction.getEntry();
+ Collections.sort(entries, new EntryComparator());
+ results.addAll(entries);
}
}
@@ -336,9 +330,8 @@
* @param description
* @param row
* @return int: indexOf new Entry
- * @throws LimaException
*/
- public int addEmptyEntry(Object value, String description, int row) throws LimaException {
+ public int addEmptyEntry(Object value, String description, int row) {
FinancialTransaction currentTransaction = null;
Object currentRow = cacheDataList.get(row);
Entry entry = new EntryImpl();
@@ -383,12 +376,9 @@
break;
}
// notify service for modification
- try {
- financialTransactionService.
+ financialTransactionService.
updateFinancialTransaction(currentFinancialTransaction);
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't update financial transaction", eee);
- }
+
//update the financial transaction in entire
// financialTransactionRow =
// cacheDataList.indexOf(currentRow);
@@ -416,11 +406,9 @@
currentEntry.setLettering((String) value);
break;
}
- try {
- financialTransactionService.updateEntry(currentEntry);
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't update entry", eee);
- }
+
+ financialTransactionService.updateEntry(currentEntry);
+
//update the financial transaction in entire
// financialTransactionRow =
// cacheDataList.indexOf(((Entry) currentRow).
@@ -446,9 +434,8 @@
*
* @param object
* @param row
- * @throws LimaException
*/
- public void removeObject(Object object, int row) throws LimaException {
+ public void removeObject(Object object, int row) {
Object currentRow = cacheDataList.get(row);
if (currentRow instanceof FinancialTransaction) {
FinancialTransaction currentTransaction =
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2012-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionunbalanced/FinancialTransactionUnbalancedViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -32,8 +32,6 @@
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.entity.FinancialTransaction;
import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
@@ -68,20 +66,16 @@
int indexSelectedRow = table.getSelectedRow();
if (indexSelectedRow != -1) {
Object selectedValue = tableModel.getElementAt(indexSelectedRow);
- try {
- //copy + paste the description
- String description = (String) tableModel.getValueAt(indexSelectedRow, 4);
- int index = tableModel.addEmptyEntry(selectedValue, description, 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) {
- throw new LimaRuntimeException("Can't add emptyentry", eee);
- }
+ //copy + paste the description
+ String description = (String) tableModel.getValueAt(indexSelectedRow, 4);
+ int index = tableModel.addEmptyEntry(selectedValue, description, 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();
} else {
if (log.isWarnEnabled()) {
log.warn("Call addentry selected transaction without selection");
@@ -114,16 +108,11 @@
_("lima.common.confirmation"), JOptionPane.YES_NO_OPTION);
if (response == JOptionPane.YES_OPTION) {
-
- try {
- tableModel.removeObject(selectedValue, indexSelectedRow);
- //select the upper line
- ListSelectionModel selectionModel =
- table.getSelectionModel();
- selectionModel.setSelectionInterval(indexSelectedRow - 1, indexSelectedRow - 1);
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't remove transaction or entry", eee);
- }
+ tableModel.removeObject(selectedValue, indexSelectedRow);
+ //select the upper line
+ ListSelectionModel selectionModel =
+ table.getSelectionModel();
+ selectionModel.setSelectionInterval(indexSelectedRow - 1, indexSelectedRow - 1);
}
} else {
if (log.isWarnEnabled()) {
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -39,7 +39,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.api.FiscalPeriodService;
@@ -95,12 +94,8 @@
* Reload fiscal period list from service and update ui.
*/
public void loadAllFiscalPeriod() {
- try {
- List<FiscalPeriod> periods = fiscalPeriodService.getAllFiscalPeriods();
- view.getFiscalPeriodTableModel().setFiscalPeriods(periods);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Cant get fiscal perdiods", ex);
- }
+ List<FiscalPeriod> periods = fiscalPeriodService.getAllFiscalPeriods();
+ view.getFiscalPeriodTableModel().setFiscalPeriods(periods);
}
/**
@@ -128,12 +123,8 @@
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
}
if (response == JOptionPane.YES_OPTION) {
- try {
- fiscalPeriod = fiscalPeriodService.createFiscalPeriod(fiscalPeriod);
- model.addFiscalPeriod(fiscalPeriod);
- } catch (LimaException ex) {
- throw new LimaRuntimeException("Can't add fiscal period", ex);
- }
+ fiscalPeriod = fiscalPeriodService.createFiscalPeriod(fiscalPeriod);
+ model.addFiscalPeriod(fiscalPeriod);
}
}
}
@@ -181,43 +172,35 @@
FiscalPeriodTableModel model = view.getFiscalPeriodTableModel();
FiscalPeriod selectedFiscalPeriod = model.getFiscalPeriodAt(selectedRow);
- try {
-
- //check if the user want to block the fiscal year
- int response = JOptionPane.showConfirmDialog(view,
- _("lima.ui.fiscalperiod.block.confirmation"),
- _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
- JOptionPane.WARNING_MESSAGE);
- if (response == JOptionPane.YES_OPTION) {
- //use to tell if the user wants to create a new fiscal year
- boolean newyear = false;
- //check if two fiscal periods are open
- if (model.getRowCount() - 1 != selectedRow) {
- newyear = true; //two are open
- } else {
- //check if the user wants to create a new fiscal year
- response = JOptionPane.showConfirmDialog(view,
- _("lima.ui.fiscalperiod.block.newyear"),
- _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- // create a new fiscal year
- if (response == JOptionPane.YES_OPTION) {
- addFiscalPeriod();
- newyear = true;
- }
+ //check if the user want to block the fiscal year
+ int response = JOptionPane.showConfirmDialog(view,
+ _("lima.ui.fiscalperiod.block.confirmation"),
+ _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
+ JOptionPane.WARNING_MESSAGE);
+ if (response == JOptionPane.YES_OPTION) {
+ //use to tell if the user wants to create a new fiscal year
+ boolean newyear = false;
+ //check if two fiscal periods are open
+ if (model.getRowCount() - 1 != selectedRow) {
+ newyear = true; //two are open
+ } else {
+ //check if the user wants to create a new fiscal year
+ response = JOptionPane.showConfirmDialog(view,
+ _("lima.ui.fiscalperiod.block.newyear"),
+ _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ // create a new fiscal year
+ if (response == JOptionPane.YES_OPTION) {
+ addFiscalPeriod();
+ newyear = true;
}
-
- // FIXME report a nouveau et bloquage en une seule opération
- // transactionnelle
- addRetainedEarnings(selectedFiscalPeriod, newyear);
- selectedFiscalPeriod = fiscalPeriodService.blockFiscalPeriod(selectedFiscalPeriod);
- model.updateFiscalPeriod(selectedFiscalPeriod);
}
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't block fiscalperiod", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
+
+ // FIXME report a nouveau et bloquage en une seule opération
+ // transactionnelle
+ addRetainedEarnings(selectedFiscalPeriod, newyear);
+ selectedFiscalPeriod = fiscalPeriodService.blockFiscalPeriod(selectedFiscalPeriod);
+ model.updateFiscalPeriod(selectedFiscalPeriod);
}
}
@@ -231,56 +214,48 @@
@Deprecated
public void addRetainedEarnings(FiscalPeriod selectedFiscalPeriod, boolean newyear) {
- try {
- boolean found = false;
- List<FinancialTransaction> financialTransactionsList =
- financialTransactionService.getAllFinancialTransactions(
- selectedFiscalPeriod.getBeginDate(), selectedFiscalPeriod.getEndDate());
- //check if they are at least one transaction to be report
- if (!financialTransactionsList.isEmpty()) {
- int i = 0;
- while (i < financialTransactionsList.size() && !found) {
- Collection<Entry> entryList = financialTransactionsList.get(i).getEntry();
- for (Entry entry : entryList) {
- if (Integer.valueOf(entry.getAccount().getAccountNumber().substring(0, 1)) < 6
- && !entry.getAmount().equals(BigDecimal.ZERO)) {
- found = true;
- }
+ boolean found = false;
+ List<FinancialTransaction> financialTransactionsList =
+ financialTransactionService.getAllFinancialTransactions(
+ selectedFiscalPeriod.getBeginDate(), selectedFiscalPeriod.getEndDate());
+ //check if they are at least one transaction to be report
+ if (!financialTransactionsList.isEmpty()) {
+ int i = 0;
+ while (i < financialTransactionsList.size() && !found) {
+ Collection<Entry> entryList = financialTransactionsList.get(i).getEntry();
+ for (Entry entry : entryList) {
+ if (Integer.valueOf(entry.getAccount().getAccountNumber().substring(0, 1)) < 6
+ && !entry.getAmount().equals(BigDecimal.ZERO)) {
+ found = true;
}
- i++;
}
+ i++;
}
- //report if they are at least one transaction to be report
- if (found) {
- //check if the user wants to report datas
- int response = JOptionPane.showConfirmDialog(view,
- _("lima.ui.fiscalperiod.block.addretainedearnings"),
- _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE);
- //ask user for the entrybook to use for retained earnings
- if (response == JOptionPane.YES_OPTION) {
- //Sets EntryBook
- EntryBook newEntryBook = new EntryBookImpl();
- RetainedEarningsEntryBookForm entryBookForm =
- new RetainedEarningsEntryBookForm(view);
- entryBookForm.setEntryBook(newEntryBook);
- // jaxx constructor don't call super() ?
- entryBookForm.setLocationRelativeTo(view);
- entryBookForm.setVisible(true);
- // null == cancel action
- EntryBook entryBook = entryBookForm.getEntryBook();
- if (entryBook != null) {
- fiscalPeriodService.addRetainedEarnings(
- selectedFiscalPeriod, newyear, entryBook);
- }
+ }
+ //report if they are at least one transaction to be report
+ if (found) {
+ //check if the user wants to report datas
+ int response = JOptionPane.showConfirmDialog(view,
+ _("lima.ui.fiscalperiod.block.addretainedearnings"),
+ _("lima.ui.fiscalperiod.block.title"), JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE);
+ //ask user for the entrybook to use for retained earnings
+ if (response == JOptionPane.YES_OPTION) {
+ //Sets EntryBook
+ EntryBook newEntryBook = new EntryBookImpl();
+ RetainedEarningsEntryBookForm entryBookForm =
+ new RetainedEarningsEntryBookForm(view);
+ entryBookForm.setEntryBook(newEntryBook);
+ // jaxx constructor don't call super() ?
+ entryBookForm.setLocationRelativeTo(view);
+ entryBookForm.setVisible(true);
+ // null == cancel action
+ EntryBook entryBook = entryBookForm.getEntryBook();
+ if (entryBook != null) {
+ fiscalPeriodService.addRetainedEarnings(
+ selectedFiscalPeriod, newyear, entryBook);
}
}
- } catch (LimaException eee) {
- if (log.isErrorEnabled()) {
- log.error("Can't set net income", eee);
- }
- DialogHelper.showErrorMessageDialog(view, eee);
-
}
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2012-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -53,8 +53,6 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.api.ExportService;
import org.chorem.lima.business.api.ImportService;
import org.chorem.lima.business.utils.ImportExportEntityEnum;
@@ -122,7 +120,7 @@
final Boolean importMode = importExportMethode.getImportMode();
new SwingWorker<String, Void>() {
@Override
- protected String doInBackground() throws LimaException {
+ protected String doInBackground() {
String datas;
String result = "";
switch (importExportMethodeF) {
@@ -234,12 +232,14 @@
}
}
}
- } catch (InterruptedException eee) {
+ } catch (InterruptedException ex) {
if (log.isErrorEnabled()) {
- log.error("Can't get result message", eee);
+ log.error("Can't get result message", ex);
}
} catch (ExecutionException ex) {
- throw new LimaRuntimeException("Error during import", ex);
+ if (log.isErrorEnabled()) {
+ log.error("Can't get result message", ex);
+ }
}
}
}.execute();
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerViewHandler.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -45,8 +45,6 @@
import org.chorem.lima.LimaConfig;
import org.chorem.lima.beans.BalanceTrial;
import org.chorem.lima.beans.ReportsDatas;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.api.FiscalPeriodService;
@@ -131,23 +129,20 @@
*/
public List<Object> getDataList() {
List<Object> results = new ArrayList<Object>();
- try {
- balanceTrialCache = reportService.generateLedger(selectedBeginDate,
- selectedEndDate, selectedAccounts,
- view.getMovmentedFilter().isSelected());
- if (balanceTrialCache.getReportsDatas() != null) {
- for (ReportsDatas reportsDatas : balanceTrialCache.getReportsDatas()) {
- results.add(reportsDatas);
- List<Entry> entries = reportsDatas.getListEntry();
- if (entries != null) {
- Collections.sort(entries, new EntryComparator());
- results.addAll(entries);
- }
+ balanceTrialCache = reportService.generateLedger(selectedBeginDate,
+ selectedEndDate, selectedAccounts,
+ view.getMovmentedFilter().isSelected());
+ if (balanceTrialCache.getReportsDatas() != null) {
+ for (ReportsDatas reportsDatas : balanceTrialCache.getReportsDatas()) {
+ results.add(reportsDatas);
+ List<Entry> entries = reportsDatas.getListEntry();
+ if (entries != null) {
+ Collections.sort(entries, new EntryComparator());
+ results.addAll(entries);
}
}
- } catch (LimaException eee) {
- throw new LimaRuntimeException("Can't get entries list", eee);
}
+
return results;
}
@@ -190,12 +185,7 @@
if (selectedBeginDate != null && selectedEndDate != null) {
//looks for all blocked fiscal periods
- List<FiscalPeriod> blockedFiscalPeriods = new ArrayList<FiscalPeriod>();
- try {
- blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.ledger.documentcreationerror"), eee);
- }
+ List<FiscalPeriod> blockedFiscalPeriods = fiscalPeriodService.getAllBlockedFiscalPeriods();
//tells if the fiscaPeriod as been found and is blocked
boolean error = true;
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -37,8 +37,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.api.ImportService;
@@ -48,7 +46,6 @@
import org.chorem.lima.entity.EntryBook;
import org.chorem.lima.entity.FinancialTransaction;
import org.chorem.lima.service.LimaServiceFactory;
-import org.chorem.lima.util.DialogHelper;
/**
* Basic transaction table model.
@@ -118,18 +115,14 @@
protected List<Object> getDataList() {
List<Object> results = new ArrayList<Object>();
if (selectedBeginDate != null && selectedEndDate != null) {
- try {
- List<FinancialTransaction> financialtransactions =
- financialTransactionService.getAllFinancialTransactions(
- selectedBeginDate, selectedEndDate);
- for (FinancialTransaction financialtransaction : financialtransactions) {
- results.add(financialtransaction);
- List<Entry> entries = (List<Entry>) financialtransaction.getEntry();
- Collections.sort(entries, new EntryComparator());
- results.addAll(entries);
- }
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.lettering.listerror"), eee);
+ List<FinancialTransaction> financialtransactions =
+ financialTransactionService.getAllFinancialTransactions(
+ selectedBeginDate, selectedEndDate);
+ for (FinancialTransaction financialtransaction : financialtransactions) {
+ results.add(financialtransaction);
+ List<Entry> entries = (List<Entry>) financialtransaction.getEntry();
+ Collections.sort(entries, new EntryComparator());
+ results.addAll(entries);
}
}
return results;
@@ -392,15 +385,9 @@
currentEntry.setLettering((String) value);
break;
}
- try {
- financialTransactionService.updateEntry(currentEntry);
- } catch (LimaException eee) {
- if (log.isDebugEnabled()) {
- log.error("Can't update entry", eee);
- }
- DialogHelper.showMessageDialog(eee.getMessage());
- }
+ financialTransactionService.updateEntry(currentEntry);
+
//update the financial transaction in entire
financialTransactionRow =
getDataList().indexOf(((Entry) currentRow).
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-05-16 12:41:14 UTC (rev 3425)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/vatreports/VatReportTableModel.java 2012-05-16 13:02:27 UTC (rev 3426)
@@ -35,14 +35,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.beans.VatStatementAmounts;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
import org.chorem.lima.business.api.FinancialTransactionService;
import org.chorem.lima.business.api.ImportService;
import org.chorem.lima.business.api.VatStatementService;
import org.chorem.lima.service.LimaServiceFactory;
-import org.nuiton.topia.TopiaException;
public class VatReportTableModel extends AbstractTableModel implements ServiceListener {
@@ -88,28 +85,19 @@
LimaServiceFactory.addServiceListener(ImportService.class, this);
}
- protected List<VatStatementAmounts> getDataList() throws TopiaException {
+ protected List<VatStatementAmounts> getDataList() {
List<VatStatementAmounts> list = null;
if (selectedBeginDate != null || selectedEndDate != null) {
- try {
- list = vatStatementService.vatStatementReport(
- getBeginDate(),
- getEndDate());
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.vatreport.listerror"), eee);
- }
+ list = vatStatementService.vatStatementReport(
+ getBeginDate(), getEndDate());
}
return list;
}
public void refresh() {
- try {
- cacheDataList = getDataList();
- } catch (TopiaException eee) {
- throw new LimaRuntimeException("Can't get VAT list", eee);
- }
+ cacheDataList = getDataList();
fireTableDataChanged();
}
1
0
r3425 - in trunk/lima-swing/src/main: java/org/chorem/lima/enums java/org/chorem/lima/ui/accountsreports java/org/chorem/lima/ui/celleditor java/org/chorem/lima/ui/combobox java/org/chorem/lima/ui/common java/org/chorem/lima/ui/financialtransactionsearch resources/i18n
by echatellier@users.chorem.org 16 May '12
by echatellier@users.chorem.org 16 May '12
16 May '12
Author: echatellier
Date: 2012-05-16 14:41:14 +0200 (Wed, 16 May 2012)
New Revision: 3425
Url: http://chorem.org/repositories/revision/lima/3425
Log:
Refactoring rapport - edition des comptes
Added:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountComboBoxModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountRenderer.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Removed:
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties
Modified:
trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTable.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java
trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/enums/ComboBoxDatesEnum.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -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
@@ -27,14 +27,27 @@
import static org.nuiton.i18n.I18n._;
-
+/**
+ * Enumeration representant un choix de type de periode.
+ *
+ * Actuellement:
+ * - Exercice
+ * - Period financiere
+ * - Period par interval de date.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
public enum ComboBoxDatesEnum {
FISCAL_PERIOD(_("lima.enum.comboboxperiod.fiscalperiod")),
FINANCIAL_PERIOD(_("lima.enum.comboboxperiod.financialperiod")),
PERIOD(_("lima.enum.comboboxperiod.period"));
- private final String description;
+ protected String description;
ComboBoxDatesEnum(String description) {
this.description = description;
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountComboBox.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -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,70 +25,52 @@
package org.chorem.lima.ui.accountsreports;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+
+import javax.swing.JComboBox;
+
import org.chorem.lima.entity.Account;
-import org.chorem.lima.ui.combobox.AccountComboBoxModel;
-import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.util.AccountToString;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
-import javax.swing.JComboBox;
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-
+/**
+ * Combo box pour les comptes qui ajoute quelques comportement comme
+ * l'autocompletion.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
public class AccountComboBox extends JComboBox implements KeyListener {
private static final long serialVersionUID = 1L;
- private static final Log log =
- LogFactory.getLog(AccountComboBox.class);
-
- protected AccountsReportsViewHandler handler;
-
- public AccountComboBox(AccountsReportsViewHandler handler) {
- this.handler = handler;
- AccountComboBoxModel accountComboBoxModel = new AccountComboBoxModel();
- AccountRenderer accountRenderer = new AccountRenderer();
- setModel(accountComboBoxModel);
- setRenderer(accountRenderer);
- setEditable(true);
+ public AccountComboBox() {
AutoCompleteDecorator.decorate(this, AccountToString.getInstance());
getEditor().getEditorComponent().addKeyListener(this);
- addActionListener(this);
}
public void back() {
int row = getSelectedIndex();
- log.debug(row);
+
if (row > 0) {
getEditor().setItem(getItemAt(row - 1));
- handler.setAccount((Account) getSelectedItem());
}
}
public void next() {
int size = getModel().getSize();
int row = getSelectedIndex();
- log.debug(row);
if (row < size - 1) {
getEditor().setItem(getItemAt(row + 1));
- handler.setAccount((Account) getSelectedItem());
}
}
@Override
- public void actionPerformed(ActionEvent e) {
- Object object = getSelectedItem();
- if (object instanceof Account) {
- handler.setAccount((Account) getSelectedItem());
- }
- }
-
-
- @Override
public void keyPressed(KeyEvent e) {
}
@@ -97,7 +79,7 @@
public void keyReleased(KeyEvent e) {
Object object = getSelectedItem();
if (object instanceof Account) {
- handler.setAccount((Account) getSelectedItem());
+ fireActionEvent();
}
// delegate popup list menu
@@ -110,5 +92,4 @@
public void keyTyped(KeyEvent e) {
}
-
}
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsPeriodSearchPanel.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -1,160 +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.accountsreports;
-
-import org.apache.commons.lang3.time.DateUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.lima.entity.FinancialPeriod;
-import org.chorem.lima.entity.FiscalPeriod;
-import org.chorem.lima.enums.ComboBoxDatesEnum;
-import org.chorem.lima.ui.LimaRendererUtil;
-import org.chorem.lima.ui.combobox.FinancialPeriodComboBoxModel;
-import org.chorem.lima.ui.combobox.FiscalPeriodComboBoxModel;
-import org.jdesktop.swingx.JXDatePicker;
-
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.ListCellRenderer;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.Calendar;
-import java.util.Date;
-
-import static org.nuiton.i18n.I18n._;
-
-public class AccountsReportsPeriodSearchPanel extends JPanel {
-
- private static final Log log =
- LogFactory.getLog(AccountsReportsPeriodSearchPanel.class);
-
- protected AccountsReportsViewHandler handler;
-
- public AccountsReportsPeriodSearchPanel(AccountsReportsViewHandler handler) {
- this.handler = handler;
-
- //init date
- refresh(ComboBoxDatesEnum.FISCAL_PERIOD);
- }
-
- public void refresh(ComboBoxDatesEnum comboBoxPeriodEnum) {
-
- switch (comboBoxPeriodEnum) {
- case PERIOD:
- // get begin date
- Calendar calendarBegin = Calendar.getInstance();
- // set begindate to JAN 1 - 0:00.000 of this years
- Date beginDate = calendarBegin.getTime();
- beginDate = DateUtils.truncate(beginDate, Calendar.YEAR);
- //handler().setBeginDate(beginDate);
-
- // get end date
- Calendar calendarEnd = Calendar.getInstance();
- Date endDate = calendarEnd.getTime();
- //handler().setEndDate(endDate);
- JLabel beginDateLabel = new JLabel(_("lima.common.begindate"));
- final JXDatePicker beginDatePicker = new JXDatePicker(beginDate);
- ActionListener beginDateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setBeginDate(beginDatePicker.getDate());
- handler.refresh();
- }
- };
- handler.setBeginDate(beginDatePicker.getDate());
- beginDatePicker.addActionListener(beginDateActionListener);
-
- JLabel endDateLabel = new JLabel(_("lima.common.enddate"));
- final JXDatePicker endDatePicker = new JXDatePicker(endDate);
- ActionListener endDateActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- handler.setEndDate(endDatePicker.getDate());
- handler.refresh();
- }
- };
- handler.setEndDate(endDatePicker.getDate());
- endDatePicker.addActionListener(endDateActionListener);
- handler.refresh();
-
- removeAll();
- add(beginDateLabel);
- add(beginDatePicker);
- add(endDateLabel);
- add(endDatePicker);
- break;
-
- case FISCAL_PERIOD:
- FiscalPeriodComboBoxModel fiscalModel = new FiscalPeriodComboBoxModel(true);
- ListCellRenderer renderer =
- LimaRendererUtil.newDecoratorListCellRenderer(FiscalPeriod.class);
- final JComboBox fiscalPeriod = new JComboBox(fiscalModel);
- fiscalPeriod.setRenderer(renderer);
- fiscalPeriod.setEditable(false);
- ActionListener fiscalPeriodActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- FiscalPeriod fPeriod = (FiscalPeriod) fiscalPeriod.getSelectedItem();
- if (fPeriod != null) {
- handler.setBeginDate(fPeriod.getBeginDate());
- handler.setEndDate(fPeriod.getEndDate());
- handler.refresh();
- }
- }
- };
- fiscalPeriod.addActionListener(fiscalPeriodActionListener);
-
- removeAll();
- add(fiscalPeriod);
- break;
-
- case FINANCIAL_PERIOD:
- FinancialPeriodComboBoxModel financialModel = new FinancialPeriodComboBoxModel(true);
- renderer = LimaRendererUtil.newDecoratorListCellRenderer(FinancialPeriod.class);
- final JComboBox financialPeriod = new JComboBox(financialModel);
- financialPeriod.setRenderer(renderer);
- financialPeriod.setEditable(false);
- ActionListener financialPeriodActionListener = new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- FinancialPeriod fPeriod = (FinancialPeriod) financialPeriod.getSelectedItem();
- if (fPeriod != null) {
- handler.setBeginDate(fPeriod.getBeginDate());
- handler.setEndDate(fPeriod.getEndDate());
- handler.refresh();
- }
- }
- };
- financialPeriod.addActionListener(financialPeriodActionListener);
- removeAll();
- add(financialPeriod);
- break;
- }
-
- }
-
-}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTable.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTable.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTable.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -45,12 +45,8 @@
private static final Log log = LogFactory
.getLog(AccountsReportsTable.class);
- protected AccountsReportsViewHandler handler;
+ public AccountsReportsTable() {
- public AccountsReportsTable(AccountsReportsViewHandler handler) {
-
- this.handler = handler;
-
addKeyListener(this);
addMouseListener(this);
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-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsTableModel.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -51,17 +51,16 @@
private static final Log log = LogFactory.getLog(AccountsReportsTableModel.class);
/** data cache */
- protected ReportsDatas cacheDataList;
+ protected ReportsDatas reportDatas;
-
@Override
public int getRowCount() {
int result = 0;
// just prevent too much result
- if (cacheDataList != null) {
- if (cacheDataList.getListEntry() != null) {
- result = cacheDataList.getListEntry().size();
+ if (reportDatas != null) {
+ if (reportDatas.getListEntry() != null) {
+ result = reportDatas.getListEntry().size();
}
}
@@ -144,8 +143,9 @@
@Override
public Object getValueAt(int row, int column) {
Object result = null;
- if (cacheDataList != null) {
- Entry currentRow = cacheDataList.getListEntry().get(row);
+ if (reportDatas != null) {
+ Entry currentRow = reportDatas.getListEntry().get(row);
+ // FIXME echatellier 20120515, move it to renderer
SimpleDateFormat simpleDateFormat
= new SimpleDateFormat("dd MMMMM yyyy");
@@ -189,16 +189,8 @@
return result;
}
-
- @Override
- public boolean isCellEditable(int rowIndex, int columnIndex) {
- // Just read, no write
- return false;
- }
-
- public void refresh(ReportsDatas datasList) {
- cacheDataList = datasList;
+ public void setReportDatas(ReportsDatas reportDatas) {
+ this.reportDatas = reportDatas;
fireTableDataChanged();
}
-
}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsView.jaxx 2012-05-16 12:41:14 UTC (rev 3425)
@@ -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
@@ -27,63 +27,74 @@
<import>
javax.swing.ListSelectionModel
+ org.jdesktop.swingx.JXDatePicker
org.jdesktop.swingx.decorator.HighlighterFactory
org.chorem.lima.enums.ComboBoxDatesEnum
org.chorem.lima.ui.accountsreports.AccountComboBox
+ org.chorem.lima.ui.common.AccountComboBoxModel
+ org.chorem.lima.ui.common.FiscalPeriodComboBoxModel
+ org.chorem.lima.ui.common.FinancialPeriodComboBoxModel
</import>
- <AccountsReportsViewHandler id="handler"
- javaBean="new AccountsReportsViewHandler(this)"/>
- <Boolean id="selectedRow" javaBean="false"/>
- <AccountsReportsTableModel id="modelAccountsReportsTable"/>
+ <AccountsReportsViewHandler id="handler" constructorParams="this"/>
+
<script>
<![CDATA[
- AccountsReportsPeriodSearchPanel periodSearchPanel = new AccountsReportsPeriodSearchPanel(handler);
- AccountComboBox comboBox = new AccountComboBox(handler);
-
- void $afterCompleteSetup() {
- }
-
+ void $afterCompleteSetup() {
+ handler.init();
+ }
]]>
</script>
<row weightx="1" weighty="0" anchor="center">
- <cell fill='both'>
- <Table>
- <row>
- <cell anchor="west">
- <JComboBox id="periodComboBox"
- javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
- onActionPerformed="periodSearchPanel.refresh(ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem()));
- validate(); repaint()"/>
- </cell>
- <cell>
- <AccountsReportsPeriodSearchPanel javaBean="periodSearchPanel"/>
- </cell>
- </row>
- </Table>
+ <cell fill='horizontal'>
+ <JComboBox id="periodComboBox"
+ javaBean="new JComboBox(ComboBoxDatesEnum.descriptions())"
+ onActionPerformed="handler.periodTypeChanged()"/>
</cell>
- <cell anchor="east">
+ <cell fill='horizontal'>
+ <CardLayout id="periodTypeLayout" />
+ <JPanel id="periodTypeContainer" layout="{periodTypeLayout}">
+ <FiscalPeriodComboBoxModel id="fiscalPeriodModel" />
+ <JComboBox id="fiscalPeriodComboBox" model="{fiscalPeriodModel}"
+ renderer="{new org.chorem.lima.ui.common.FiscalPeriodListRenderer()}"
+ onItemStateChanged="handler.periodsChanged(event)" constraints='"FISCAL_PERIOD"' />
+ <FinancialPeriodComboBoxModel id="financialPeriodModel" />
+ <JComboBox id="financialPeriodComboBox" model="{financialPeriodModel}"
+ renderer="{new org.chorem.lima.ui.common.FinancialPeriodListRenderer()}"
+ onItemStateChanged="handler.periodsChanged(event)" constraints='"FINANCIAL_PERIOD"' />
+ <JPanel constraints='"PERIOD"'>
+ <JLabel text="lima.common.begindate" />
+ <JXDatePicker id="periodBeginDatePicker" onActionPerformed="handler.periodDatesChanged()" />
+ <JLabel text="lima.common.enddate" />
+ <JXDatePicker id="periodEndDatePicker" onActionPerformed="handler.periodDatesChanged()" />
+ </JPanel>
+ </JPanel>
+ </cell>
+ <cell fill='horizontal' anchor="east">
<JLabel id="accountSelectorLabel" text="lima.common.account"/>
</cell>
- <cell anchor="west">
- <JComboBox javaBean='comboBox'/>
+ <cell fill='horizontal' anchor="west">
+ <AccountComboBoxModel id="accountComboboxModel" />
+ <AccountComboBox id="accountComboBox" model="{accountComboboxModel}"
+ renderer="{new org.chorem.lima.ui.common.AccountRenderer()}"
+ onItemStateChanged="handler.accountChanged(event)" />
</cell>
<cell>
<JButton id="back" text="lima.common.buttonback"
- onActionPerformed="comboBox.back()"/>
+ onActionPerformed="accountComboBox.back()"/>
</cell>
<cell>
<JButton id="next" text="lima.common.buttonnext"
- onActionPerformed="comboBox.next()"/>
+ onActionPerformed="accountComboBox.next()"/>
</cell>
</row>
<row>
<cell fill="both" weightx="1" weighty="1" columns="6">
<JScrollPane>
+ <AccountsReportsTableModel id="accountsReportsTableModel"/>
<AccountsReportsTable
id="accountsReportsTable" rowHeight="24"
- constructorParams="getHandler()"
- model="{getModelAccountsReportsTable()}"
+ model="{accountsReportsTableModel}"
highlighters="{HighlighterFactory.createSimpleStriping(new java.awt.Color(222,222,222))}"
selectionMode="{ListSelectionModel.SINGLE_SELECTION}"
columnControlVisible="true"/>
@@ -97,19 +108,19 @@
<Table>
<row fill="horizontal" weightx="1">
<cell>
- <JLabel text="lima.common.amountdebit"/>
+ <JLabel text="lima.ui.common.amountdebit"/>
</cell>
<cell>
<JLabel id="amountDebitLabel"/>
</cell>
<cell>
- <JLabel text="lima.common.amountcredit"/>
+ <JLabel text="lima.ui.common.amountcredit"/>
</cell>
<cell>
<JLabel id="amountCreditLabel"/>
</cell>
<cell>
- <JLabel id="soldeLabel" text="lima.common.solde"/>
+ <JLabel id="soldeLabel" text="lima.ui.common.solde"/>
</cell>
<cell>
<JLabel id="amountSoldeLabel"/>
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/AccountsReportsViewHandler.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -27,23 +27,31 @@
import static org.nuiton.i18n.I18n._;
+import java.awt.event.ItemEvent;
import java.math.BigDecimal;
+import java.util.Calendar;
import java.util.Date;
+import java.util.List;
+import javax.swing.JComboBox;
+
+import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.beans.ReportsDatas;
-import org.chorem.lima.business.LimaException;
-import org.chorem.lima.business.LimaRuntimeException;
import org.chorem.lima.business.ServiceListener;
+import org.chorem.lima.business.api.AccountService;
+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.entity.Account;
+import org.chorem.lima.entity.FinancialPeriod;
+import org.chorem.lima.entity.FiscalPeriod;
+import org.chorem.lima.enums.ComboBoxDatesEnum;
import org.chorem.lima.service.LimaServiceFactory;
-import org.chorem.lima.ui.combobox.AccountComboBoxModel;
-
/**
* Handler associated with accounts reports view.
* By : $Author$
@@ -52,106 +60,157 @@
protected AccountsReportsView view;
- protected AccountsReportsTable table;
-
- protected AccountsReportsTableModel tableModel;
-
- protected AccountComboBoxModel comboBoxModel;
-
/** log. */
private static final Log log = LogFactory.getLog(AccountsReportsViewHandler.class);
- /** Account. */
- protected Account selectedAccount;
-
- /** Begin Date. */
- protected Date selectedBeginDate;
-
- /** EndDate. */
- protected Date selectedEndDate;
-
/** Services. */
protected ReportService reportService;
+ protected AccountService accountService;
+ protected FiscalPeriodService fiscalPeriodService;
+ protected FinancialPeriodService financialPeriodService;
protected AccountsReportsViewHandler(AccountsReportsView view) {
this.view = view;
reportService = LimaServiceFactory.getService(ReportService.class);
+ accountService = LimaServiceFactory.getService(AccountService.class);
+ fiscalPeriodService = LimaServiceFactory.getService(FiscalPeriodService.class);
+ financialPeriodService = LimaServiceFactory.getService(FinancialPeriodService.class);
LimaServiceFactory.addServiceListener(ImportService.class, this);
LimaServiceFactory.addServiceListener(FinancialTransactionService.class, this);
}
- public void setBeginDate(Date date) {
- selectedBeginDate = date;
- refresh();
+ /**
+ * Init data models and displayed objects.
+ */
+ public void init() {
+
+ // init data models
+ List<Account> account = accountService.getAllAccounts();
+ view.getAccountComboboxModel().setObjects(account);
+ List<FiscalPeriod> fiscalPeriod = fiscalPeriodService.getAllUnblockedFiscalPeriods();
+ view.getFiscalPeriodModel().setObjects(fiscalPeriod);
+ List<FinancialPeriod> financialPeriod = financialPeriodService.getUnblockedFinancialPeriods();
+ view.getFinancialPeriodModel().setObjects(financialPeriod);
+
+ // init date periods
+ initDatePeriods();
}
- public void setEndDate(Date date) {
- selectedEndDate = date;
- refresh();
+ /**
+ * Init date pickers objects with contextual dates.
+ */
+ private void initDatePeriods() {
+
+ // get begin date
+ Date beginDate = DateUtils.truncate(new Date(), Calendar.YEAR);
+ view.getPeriodBeginDatePicker().setDate(beginDate);
+
+ // get end date
+ Date endDate = new Date();
+ view.getPeriodEndDatePicker().setDate(endDate);
}
+ public void periodTypeChanged() {
+ JComboBox periodComboBox = view.getPeriodComboBox();
+ ComboBoxDatesEnum type = ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem());
- public void setAccount(Account account) {
- selectedAccount = account;
- refresh();
+ // show corresponding component in layout
+ view.getPeriodTypeLayout().show(view.getPeriodTypeContainer(), type.name());
}
- public ReportsDatas getDataList() {
- ReportsDatas results = null;
- //avoid unnecessary call to service
- if (selectedAccount != null) {
- try {
- results = reportService.generateAccountsReports(selectedAccount, true,
- selectedBeginDate, selectedEndDate);
- } catch (LimaException eee) {
- throw new LimaRuntimeException(_("lima.accountsreports.listerror"), eee);
- }
+ protected void periodsChanged(ItemEvent event) {
+ if (event.getStateChange() == ItemEvent.SELECTED) {
+ refreshData();
}
- return results;
}
- public void refresh() {
+ protected void accountChanged(ItemEvent event) {
+ if (event.getStateChange() == ItemEvent.SELECTED) {
+ refreshData();
+ }
+ }
- if (selectedBeginDate != null && selectedEndDate != null && selectedAccount != null) {
- ReportsDatas datasList = getDataList();
+ protected void periodDatesChanged() {
+ refreshData();
+ }
- tableModel = view.getModelAccountsReportsTable();
- tableModel.refresh(datasList);
+ /**
+ * Refresh table data depending on item selected on combo boxes.
+ */
+ protected void refreshData() {
+
+ Date beginDate = null;
+ Date endDate = null;
- /**
- * set text and amounts of labels credit, debit, solde
- */
+ JComboBox periodComboBox = view.getPeriodComboBox();
+ ComboBoxDatesEnum type = ComboBoxDatesEnum.valueOfDescription((String) periodComboBox.getSelectedItem());
+ switch (type) {
+ case PERIOD:
+ beginDate = view.getPeriodBeginDatePicker().getDate();
+ endDate = view.getPeriodEndDatePicker().getDate();
+ break;
+ case FINANCIAL_PERIOD: {
+ FinancialPeriod period = (FinancialPeriod)view.getFinancialPeriodComboBox().getSelectedItem();
+ if (period != null) {
+ beginDate = period.getBeginDate();
+ endDate = period.getEndDate();
+ }
+ break;
+ }
+ case FISCAL_PERIOD: {
+ FiscalPeriod period = (FiscalPeriod)view.getFiscalPeriodComboBox().getSelectedItem();
+ if (period != null) {
+ beginDate = period.getBeginDate();
+ endDate = period.getEndDate();
+ }
+ break;
+ }
+ }
+
+ Account account = (Account)view.getAccountComboBox().getModel().getSelectedItem();
+
+ if (beginDate != null && endDate != null && account != null) {
+ ReportsDatas results = reportService.generateAccountsReports(account, true,
+ beginDate, endDate);
+
+ AccountsReportsTableModel dataModel = view.getAccountsReportsTableModel();
+ dataModel.setReportDatas(results);
+ }
+
+ }
- if (datasList != null) {
- // set amounts credit and debit and solde
- view.amountCreditLabel.setText(
- datasList.getAmountCredit().toString());
- view.amountDebitLabel.setText(
- datasList.getAmountDebit().toString());
- BigDecimal amountSolde = datasList.getAmountSolde();
- view.amountSoldeLabel.setText(amountSolde.toString());
+ /**
+ * Update footer labels containing reports total sum fields.
+ *
+ * @param results result to render
+ */
+ protected void updateFooter(ReportsDatas reportsDatas) {
+ // set amounts credit and debit and solde
+ view.amountCreditLabel.setText(
+ reportsDatas.getAmountCredit().toString());
+ view.amountDebitLabel.setText(
+ reportsDatas.getAmountDebit().toString());
+ BigDecimal amountSolde = reportsDatas.getAmountSolde();
+ view.amountSoldeLabel.setText(amountSolde.toString());
- if (BigDecimal.ZERO.equals(amountSolde)) {
- view.soldeLabel.setText(_("lima.common.solde"));
- } else {
- // set label solde: credit or debit
- if (datasList.getSoldeDebit()) {
- view.soldeLabel.setText(_("lima.common.soldedebit"));
- } else {
- view.soldeLabel.setText(_("lima.common.soldecredit"));
- }
- }
+ if (BigDecimal.ZERO.equals(amountSolde)) {
+ view.soldeLabel.setText(_("lima.common.solde"));
+ } else {
+ // set label solde: credit or debit
+ if (reportsDatas.getSoldeDebit()) {
+ view.soldeLabel.setText(_("lima.common.soldedebit"));
+ } else {
+ view.soldeLabel.setText(_("lima.common.soldecredit"));
}
}
}
@Override
- public void notifyMethod(String serviceName, String methodeName) {
- if (serviceName.contains("FinancialTransaction") || methodeName.contains("importAccount") || methodeName.contains("importAll")) {
- refresh();
+ public void notifyMethod(String serviceName, String methodName) {
+ if (serviceName.contains("FinancialTransaction") || methodName.contains("importAccount") || methodName.contains("importAll")) {
+ refreshData();
}
}
-
}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -0,0 +1,28 @@
+/*
+ * #%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%
+ */
+/**
+ * Rapport - Edition comptes.
+ */
+package org.chorem.lima.ui.accountsreports;
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/accountsreports/package-info.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/celleditor/AccountTableCellEditor.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -28,8 +28,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
-import org.chorem.lima.ui.combobox.AccountRenderer;
import org.chorem.lima.ui.combobox.LeafAccountComboBoxModel;
+import org.chorem.lima.ui.common.AccountRenderer;
import org.chorem.lima.util.AccountToString;
import org.chorem.lima.widgets.JWideComboBox;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -1,64 +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.combobox;
-
-import org.chorem.lima.entity.Account;
-
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.JLabel;
-import javax.swing.JList;
-import java.awt.Component;
-
-public class AccountRenderer extends DefaultListCellRenderer {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- public Component getListCellRendererComponent(JList list,
- Object value,
- int index,
- boolean isSelected,
- boolean cellHasFocus) {
-
- JLabel label = (JLabel) super.getListCellRendererComponent(list,
- value,
- index,
- isSelected,
- cellHasFocus
- );
- if (value != null) {
- Account account = (Account) value;
- String accountLabel = account.getLabel();
- int nbChars = 30;
- if (accountLabel != null && accountLabel.length() > nbChars) {
- accountLabel = accountLabel.substring(0, nbChars) + "…";
- }
- label.setText(account.getAccountNumber() + " - " + accountLabel);
- }
- return this;
- }
-
-}
Added: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountComboBoxModel.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountComboBoxModel.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountComboBoxModel.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -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.Account;
+
+/**
+ * Account combo model.
+ *
+ * @author chatellier
+ * @version $Revision$
+ */
+public class AccountComboBoxModel extends GenericComboBoxModel<Account> {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 6991293987668268456L;
+}
Property changes on: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountComboBoxModel.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Copied: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountRenderer.java (from rev 3405, trunk/lima-swing/src/main/java/org/chorem/lima/ui/combobox/AccountRenderer.java)
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountRenderer.java (rev 0)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/AccountRenderer.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -0,0 +1,64 @@
+/*
+ * #%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.common;
+
+import org.chorem.lima.entity.Account;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import java.awt.Component;
+
+public class AccountRenderer extends DefaultListCellRenderer {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public Component getListCellRendererComponent(JList list,
+ Object value,
+ int index,
+ boolean isSelected,
+ boolean cellHasFocus) {
+
+ JLabel label = (JLabel) super.getListCellRendererComponent(list,
+ value,
+ index,
+ isSelected,
+ cellHasFocus
+ );
+ if (value != null) {
+ Account account = (Account) value;
+ String accountLabel = account.getLabel();
+ int nbChars = 30;
+ if (accountLabel != null && accountLabel.length() > nbChars) {
+ accountLabel = accountLabel.substring(0, nbChars) + "…";
+ }
+ label.setText(account.getAccountNumber() + " - " + accountLabel);
+ }
+ return this;
+ }
+
+}
Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java
===================================================================
--- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2012-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransactionsearch/AccountSearchComboBox.java 2012-05-16 12:41:14 UTC (rev 3425)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.lima.entity.Account;
import org.chorem.lima.ui.combobox.AccountComboBoxModel;
-import org.chorem.lima.ui.combobox.AccountRenderer;
+import org.chorem.lima.ui.common.AccountRenderer;
import org.chorem.lima.util.AccountToString;
import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
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-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_en_GB.properties 2012-05-16 12:41:14 UTC (rev 3425)
@@ -210,11 +210,14 @@
lima.ui.account.removeaccounttitle=
lima.ui.account.shortened=
lima.ui.account.updateaccounttitle=
+lima.ui.common.amountcredit=
+lima.ui.common.amountdebit=
lima.ui.common.cancel=
lima.ui.common.error=
lima.ui.common.ok=
lima.ui.common.refresh=
lima.ui.common.remove=
+lima.ui.common.solde=
lima.ui.common.update=
lima.ui.entrybook.add=
lima.ui.entrybook.code=
Deleted: 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-05-15 14:12:34 UTC (rev 3424)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-05-16 12:41:14 UTC (rev 3425)
@@ -1,327 +0,0 @@
-=
-lima.accountsreports.listerror=Erreur lors de la récupération des données de la liste
-lima.action.commandline.help=Afficher l'aide en console
-lima.action.fullscreen=Plein Ecran
-lima.action.fullscreen.tip=Passer en mode plein écran
-lima.action.normalscreen=Ecran normal
-lima.action.normalscreen.tip=Revenir en écran normal
-lima.balance.documentcreationerror=Erreur lors de la création du document
-lima.balance.documentcreationfiscalerror=Impossible de créer le document quand la période fiscale est ouverte
-lima.balance.listerror=Erreur lors de la récupération des données de la liste
-lima.charts.account=Plan comptable
-lima.charts.account.base=Plan comptable de base
-lima.charts.account.developed=Plan comptable développé
-lima.charts.account.number=Numéro de compte
-lima.charts.account.question.remove=Voulez-vous supprimer ce compte?
-lima.charts.account.shortened=Plan comptable abrégé
-lima.charts.financialperiod=Périodes comptables
-lima.charts.financialstatement=Plan BCR
-lima.charts.financialstatement.base=Plan BCR de base
-lima.charts.financialstatement.developed=Plan BCR développé
-lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR chargé<br/>Veuillez sélectionner un plan par défaut, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html>
-lima.charts.financialstatement.shortened=Plan BCR abrégé
-lima.charts.financialtransaction.question.removeentry=Voulez-vous supprimer cette ligne de transaction?
-lima.charts.financialtransaction.question.removetransaction=Voulez-vous supprimer cette transaction?
-lima.charts.fiscalperiod.add=Nouvel exercice
-lima.charts.fiscalperiod.block=Cloturer un exercice
-lima.charts.fiscalperiod.create=Choisissez la date de début et de fin du nouvel exercice
-lima.charts.fiscalyear=Exercices
-lima.charts.vatpdf=Structure du pdf
-lima.charts.vatstatement=Plan TVA
-lima.charts.vatstatement.base=Plan TVA de base
-lima.charts.vatstatement.deleteparent=Veuillez supprimer les sous-catégories de cette ligne
-lima.charts.vatstatement.developed=Plan TVA développé
-lima.charts.vatstatement.nothing=<html><center>Aucun plan TVA chargé<br/>Veuillez sélectionner un plan par défaut, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html>
-lima.charts.vatstatement.question.remove=Etes vous sur de vouloir supprimer cette ligne ?
-lima.charts.vatstatement.shortened=Plan TVA abrégé
-lima.common.account=Compte
-lima.common.amount=Montant
-lima.common.amountcredit=Total Crédit
-lima.common.amountdebit=Total Débit
-lima.common.autocomplete=Autocomplétion
-lima.common.begindate=Début
-lima.common.buttonback=←
-lima.common.buttonnext=→
-lima.common.cancel=Annuler
-lima.common.closed=Fermé
-lima.common.code=Code
-lima.common.confirmation=Confirmation
-lima.common.copy=Copier
-lima.common.enddate=Fin
-lima.common.entrybook=Journal
-lima.common.entrybooks=Journaux
-lima.common.error=Erreur
-lima.common.filter=Filtrer
-lima.common.info=Information
-lima.common.label=Libellé
-lima.common.movmentedfilter=Comptes mouvementés
-lima.common.ok=OK
-lima.common.open=Ouvert
-lima.common.paste=Coller
-lima.common.quit=Quitter
-lima.common.remove=Supprimer
-lima.common.search=Rechercher
-lima.common.solde=Solde
-lima.common.soldecredit=Solde Créditeur
-lima.common.soldedebit=Solde Débiteur
-lima.common.update=Modifier
-lima.config.category.directories=Répertoires
-lima.config.category.directories.description=Répertoires utilisés par Lima
-lima.config.category.other=Autre
-lima.config.category.other.description=Autre propriétés de configuration
-lima.config.configFileName.description=
-lima.config.currency.description=
-lima.config.data.dir.description=
-lima.config.decimalseparator.description=
-lima.config.host.adress=Adresse du serveur distant
-lima.config.i18n.dir.description=
-lima.config.locale.description=Locale utilisée par l'application
-lima.config.resources.dir.description=
-lima.config.scale.description=
-lima.config.ui.flaunchui.description=
-lima.config.ui.fullscreen.description=Plein écran
-lima.documents=Documents…
-lima.entries=Traitement
-lima.entries.addEntry=Ajouter entrée
-lima.entries.addTransaction=Ajouter transaction
-lima.entries.lettering=Lettrage
-lima.entries.lettering.add=Ajouter une lettre
-lima.entries.lettering.noletterselected=Erreur \: Aucune lettre sélectionnée.
-lima.entries.lettering.radiobutton.list=Lettres existantes
-lima.entries.lettering.radiobutton.new=Nouvelle lettre
-lima.entries.lettering.remove=Supprimer une lettre
-lima.entries.searchtransaction=Rechercher des écritures
-lima.entries.searchunbalancedtransaction=Entrées incorrectes
-lima.entries.writetransaction=Saisir des écritures
-lima.entrybooksreports.documentcreationerror=Erreur lors de la création du document
-lima.entrybooksreports.documentcreationfiscalerror=Impossible de créedr un document quand la période fiscale est ouverte
-lima.entrybooksreports.listerror=Erreur lors de la récupération des données de la liste
-lima.enum.comboboxaccount.account=Compte
-lima.enum.comboboxaccount.accountlist=Liste de comptes
-lima.enum.comboboxaccount.allaccount=Tous les comptes
-lima.enum.comboboxentrybook.all=Tous les journaux
-lima.enum.comboboxentrybook.select_one=Journal
-lima.enum.comboboxletter.all=Toutes les lettres
-lima.enum.comboboxletter.selectone=Lettre
-lima.enum.comboboxoperator.equal=Égal
-lima.enum.comboboxoperator.inferior=Inférieur
-lima.enum.comboboxoperator.inferiororequal=Inférieur ou égal
-lima.enum.comboboxoperator.interval=Intervalle
-lima.enum.comboboxoperator.notequal=Différent
-lima.enum.comboboxoperator.superior=Supérieur
-lima.enum.comboboxoperator.superiororequal=Supérieur ou égal
-lima.enum.comboboxperiod.date=Date
-lima.enum.comboboxperiod.financialperiod=Période Financière
-lima.enum.comboboxperiod.fiscalperiod=Exercice
-lima.enum.comboboxperiod.period=Période
-lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
-lima.financialstatement.accounts=Liste de comptes au crédit et au débit
-lima.financialstatement.addfinancialStatementHeadererror=Erreur lors de l'ajout de l'entête sur la déclaration financière
-lima.financialstatement.check=Vérification des comptes aux postes
-lima.financialstatement.creditaccounts=Liste de comptes au crédit
-lima.financialstatement.debitaccounts=Liste de comptes au débit
-lima.financialstatement.delete=Supprimer le plan BCR actuel avant d'importer
-lima.financialstatement.header.add=Ajouter une catégorie
-lima.financialstatement.headeramount=Calculer le total en en-tete
-lima.financialstatement.label=Libellé
-lima.financialstatement.movement.add=Ajouter un regrouprement
-lima.financialstatement.provisiondeprecationaccounts=Liste de comptes d'amortissement et provisions
-lima.financialstatement.subamount=Calculer un sous-total
-lima.financialstatementreport.listerror=Erreur lors de la récupération des données de la liste
-lima.fiscalperiod.unbalancedtransactions=La période fiscale contient des transactions non équilibrées
-lima.home.entrybooks.create=
-lima.identity=Identité
-lima.identity.address=Adresse
-lima.identity.address2=Adresse (suite)
-lima.identity.businessNumber=SIRET
-lima.identity.city=Ville
-lima.identity.classificationCode=Code NAF
-lima.identity.description=Description
-lima.identity.email=Courriel
-lima.identity.name=Nom
-lima.identity.phoneNumber=n° Tel
-lima.identity.vatNumber=n° TVA
-lima.identity.zipCode=Code Postal
-lima.importexport.choiceencoding=
-lima.importexport.export=
-lima.importexport.export.terminated=
-lima.importexport.usevatpdf=
-lima.init.closed=Lima fermé à %1$s
-lima.init.errorclosing=Erreur lors de la fermeture
-lima.ledger.documentcreationerror=Erreur lors de la création du document
-lima.lettering.listerror=Erreur lors de la récupération des données de la liste
-lima.menu.file=Fichier
-lima.menu.help=Aide
-lima.menu.help.about=À Propos
-lima.menu.help.i18n=Langue
-lima.menu.help.i18n.fr=Français
-lima.menu.help.i18n.uk=Anglais
-lima.menu.help.site=Accéder au site de Lima
-lima.menu.window=Fenêtre
-lima.message.help.usage=Options (set with --option <key> <value>\:
-lima.misc.supportemail.description=Adresse email de support
-lima.openejb.remotemode.description=
-lima.opening.accounts=
-lima.preferences=Préférences
-lima.reports=Rapports
-lima.reports.accounts=Edition compte
-lima.reports.balance=Balance
-lima.reports.entrybooks=Edition journal
-lima.reports.financialstatement=Bilan et Compte de résultat
-lima.reports.ledger=Grand Livre
-lima.reports.vat=Edition TVA
-lima.splash.1=Chargement des services
-lima.splash.2=Chargement de la comptabilité
-lima.splash.3=Application prête \!
-lima.structure=Structure
-lima.tab.home=Accueil
-lima.table.account=Compte
-lima.table.balance=Balance
-lima.table.credit=Crédit
-lima.table.date=Date
-lima.table.debit=Débit
-lima.table.debitcredit=Débit et Crédit
-lima.table.description=Description
-lima.table.entrybook=Journal
-lima.table.grossamount=Brut
-lima.table.label=Libellé
-lima.table.letter=Lettre
-lima.table.move.credit=Mouvement au crédit
-lima.table.move.debit=Mouvement au débit
-lima.table.netamount=Net
-lima.table.number=Numéro de compte
-lima.table.provisiondeprecationamount=Amortissements et provisions
-lima.table.solde=Solde
-lima.table.solde.credit=Solde crédit
-lima.table.solde.debit=Solde débit
-lima.table.voucher=Pièce comptable
-lima.title.about=À propos de Lima...
-lima.title.about.description=Logiciel de comptabilité Libre
-lima.tooltip.filter=<html>Expression régulière \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html>
-lima.tooltip.lettering=<html>Pour ajouter une lettre à plusieurs écritures <br/>Sélectionner plusieurs lignes avec la combinaison ctrl + click</html>
-lima.ui.account.addaccount=Nouveau compte
-lima.ui.account.addaccounttitle=Ajout d'un compte
-lima.ui.account.base=Plan comptable de base
-lima.ui.account.developed=Plan comptable développé
-lima.ui.account.importtitle=Importer
-lima.ui.account.label=Libellé
-lima.ui.account.number=Numéro de compte
-lima.ui.account.removeaccountconfirm=Voulez-vous supprimer le compte %s ?
-lima.ui.account.removeaccounttitle=Suppression d'un compte
-lima.ui.account.shortened=Plan comptable abrégé
-lima.ui.account.updateaccounttitle=Modification d'un compte
-lima.ui.common.cancel=Annuler
-lima.ui.common.error=Erreur
-lima.ui.common.ok=Ok
-lima.ui.common.refresh=
-lima.ui.common.remove=Supprimer
-lima.ui.common.update=Modifier
-lima.ui.entrybook.add=Ajout de journal
-lima.ui.entrybook.code=Code
-lima.ui.entrybook.default=Journaux par défault
-lima.ui.entrybook.deletemessage=Êtes vous sûr de vouloir supprimer le journal %s ?
-lima.ui.entrybook.deletetitle=Suppression de journal
-lima.ui.entrybook.entrybooktile=Journal
-lima.ui.entrybook.import=Importer
-lima.ui.entrybook.importtitle=Import
-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=←
-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.block.addretainedearnings=Reporter à nouveau?
-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'exercice
-lima.ui.fiscalperiod.closed=Cloturé
-lima.ui.fiscalperiod.closure=Cloture
-lima.ui.fiscalperiod.fiscalperiod=Exercice
-lima.ui.fiscalperiod.open=Ouvert
-lima.ui.home.account=Plan comptable
-lima.ui.home.chartaccounts.create=Créer le plan des comptes
-lima.ui.home.chartaccounts.modify=Modifier le plan des comptes
-lima.ui.home.chartaccounts.nothing=Aucun compte \!
-lima.ui.home.chartaccounts.state1_2=Le plan comptable possede
-lima.ui.home.chartaccounts.state2_2=comptes
-lima.ui.home.daily=Quotidien
-lima.ui.home.entrybooks=Journaux
-lima.ui.home.entrybooks.create=Créer les journaux
-lima.ui.home.entrybooks.modify=Modifier les journaux
-lima.ui.home.entrybooks.nothing=Aucun journal ouvert \!
-lima.ui.home.entrybooks.state.single=Le journal est \:
-lima.ui.home.entrybooks.state1_2.plural=Les
-lima.ui.home.entrybooks.state2_2.plural=journaux sont \:
-lima.ui.home.fiscalperiod.closed=exercices cloturés
-lima.ui.home.fiscalperiod.create=Créer un exercice
-lima.ui.home.fiscalperiod.modify=Modifier les exercices
-lima.ui.home.fiscalperiod.noopen=Aucun exercice ouvert \!
-lima.ui.home.fiscalperiod.opened=exercices ouverts
-lima.ui.home.fiscalyear=Exercices
-lima.ui.home.transaction.balanced=transactions, toutes sont équilibrées
-lima.ui.home.transaction.create=Ajouter des écritures
-lima.ui.home.transaction.modifiy.balanced=Modifier les écritures
-lima.ui.home.transaction.modifiy.unbalanced=Modifier les écritures incorrectes
-lima.ui.home.transaction.nothing=Aucune écriture
-lima.ui.home.transaction.unbalanced=transactions ne sont pas équilibrées \!
-lima.ui.importexport.accountcharts=Plan des comptes
-lima.ui.importexport.all=Tout
-lima.ui.importexport.csv=Import/Export CSV
-lima.ui.importexport.defaultentrybooks=Journaux par défaut
-lima.ui.importexport.ebp=Import/Export EBP
-lima.ui.importexport.entries=Écritures
-lima.ui.importexport.entrybooks=Journaux
-lima.ui.importexport.export=Export
-lima.ui.importexport.export.terminated=Export terminé
-lima.ui.importexport.financialstatements=Plan BCR
-lima.ui.importexport.import=Importer
-lima.ui.importexport.import.terminated=Import terminé
-lima.ui.importexport.import.vatpdfimport=Le PDF a bien été importé dans le répertoire des ressources de Lima
-lima.ui.importexport.importcsv=Import/Export CSV
-lima.ui.importexport.importebp=Import/Export EBP
-lima.ui.importexport.importerror=
-lima.ui.importexport.importtitle=
-lima.ui.importexport.vatstatements=Plan TVA
-lima.ui.importexport.wait=Traitement en cours…
-lima.ui.importexport.waittitle=Traitement en cours
-lima.ui.mainview.title=Lutin Invoice Monitoring and Accounting
-lima.ui.opening.accounts=<html><center>Veuillez sélectionner un plan par défault, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html>
-lima.ui.opening.close=Fermer
-lima.ui.opening.end=
-lima.ui.opening.entrybook=<html>Cochez la case pour importer les journaux par défaut \:<br/> Achats, Ventes, Trésorerie, Opération diverses</html>
-lima.ui.opening.import=Importer une sauvegarde CSV
-lima.ui.opening.next=Suivant
-lima.ui.opening.title=Initialisation
-lima.ui.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour démarrer votre comptabilité en quelques instants
<br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html>
-lima.vatreport.listerror=Erreur lors de la récupération des données de la liste
-lima.vatstatement.accounts=Liste des comptes
-lima.vatstatement.boxname=PDF BoxName
-lima.vatstatement.delete=Supprimer le plan TVA actuel avant d'importer
-lima.vatstatement.label=Libellé
-lima.vatstatement.mastervatstatement=
-lima.vatstatement.movement.add=Ajouter un regrouprement
-lima.warning.nimbus.landf=Le look and feel nymbus n'a pas été trouvé
-limma.config.thousandseparator.description=
Copied: trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties (from rev 3419, trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties)
===================================================================
--- trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties (rev 0)
+++ trunk/lima-swing/src/main/resources/i18n/lima-swing_fr_FR.properties 2012-05-16 12:41:14 UTC (rev 3425)
@@ -0,0 +1,330 @@
+=
+lima.accountsreports.listerror=Erreur lors de la récupération des données de la liste
+lima.action.commandline.help=Afficher l'aide en console
+lima.action.fullscreen=Plein Ecran
+lima.action.fullscreen.tip=Passer en mode plein écran
+lima.action.normalscreen=Ecran normal
+lima.action.normalscreen.tip=Revenir en écran normal
+lima.balance.documentcreationerror=Erreur lors de la création du document
+lima.balance.documentcreationfiscalerror=Impossible de créer le document quand la période fiscale est ouverte
+lima.balance.listerror=Erreur lors de la récupération des données de la liste
+lima.charts.account=Plan comptable
+lima.charts.account.base=Plan comptable de base
+lima.charts.account.developed=Plan comptable développé
+lima.charts.account.number=Numéro de compte
+lima.charts.account.question.remove=Voulez-vous supprimer ce compte?
+lima.charts.account.shortened=Plan comptable abrégé
+lima.charts.financialperiod=Périodes comptables
+lima.charts.financialstatement=Plan BCR
+lima.charts.financialstatement.base=Plan BCR de base
+lima.charts.financialstatement.developed=Plan BCR développé
+lima.charts.financialstatement.nothing=<html><center>Aucun plan BCR chargé<br/>Veuillez sélectionner un plan par défaut, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html>
+lima.charts.financialstatement.shortened=Plan BCR abrégé
+lima.charts.financialtransaction.question.removeentry=Voulez-vous supprimer cette ligne de transaction?
+lima.charts.financialtransaction.question.removetransaction=Voulez-vous supprimer cette transaction?
+lima.charts.fiscalperiod.add=Nouvel exercice
+lima.charts.fiscalperiod.block=Cloturer un exercice
+lima.charts.fiscalperiod.create=Choisissez la date de début et de fin du nouvel exercice
+lima.charts.fiscalyear=Exercices
+lima.charts.vatpdf=Structure du pdf
+lima.charts.vatstatement=Plan TVA
+lima.charts.vatstatement.base=Plan TVA de base
+lima.charts.vatstatement.deleteparent=Veuillez supprimer les sous-catégories de cette ligne
+lima.charts.vatstatement.developed=Plan TVA développé
+lima.charts.vatstatement.nothing=<html><center>Aucun plan TVA chargé<br/>Veuillez sélectionner un plan par défaut, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html>
+lima.charts.vatstatement.question.remove=Etes vous sur de vouloir supprimer cette ligne ?
+lima.charts.vatstatement.shortened=Plan TVA abrégé
+lima.common.account=Compte
+lima.common.amount=Montant
+lima.common.amountcredit=Total Crédit
+lima.common.amountdebit=Total Débit
+lima.common.autocomplete=Autocomplétion
+lima.common.begindate=Début
+lima.common.buttonback=←
+lima.common.buttonnext=→
+lima.common.cancel=Annuler
+lima.common.closed=Fermé
+lima.common.code=Code
+lima.common.confirmation=Confirmation
+lima.common.copy=Copier
+lima.common.enddate=Fin
+lima.common.entrybook=Journal
+lima.common.entrybooks=Journaux
+lima.common.error=Erreur
+lima.common.filter=Filtrer
+lima.common.info=Information
+lima.common.label=Libellé
+lima.common.movmentedfilter=Comptes mouvementés
+lima.common.ok=OK
+lima.common.open=Ouvert
+lima.common.paste=Coller
+lima.common.quit=Quitter
+lima.common.remove=Supprimer
+lima.common.search=Rechercher
+lima.common.solde=Solde
+lima.common.soldecredit=Solde Créditeur
+lima.common.soldedebit=Solde Débiteur
+lima.common.update=Modifier
+lima.config.category.directories=Répertoires
+lima.config.category.directories.description=Répertoires utilisés par Lima
+lima.config.category.other=Autre
+lima.config.category.other.description=Autre propriétés de configuration
+lima.config.configFileName.description=
+lima.config.currency.description=
+lima.config.data.dir.description=
+lima.config.decimalseparator.description=
+lima.config.host.adress=Adresse du serveur distant
+lima.config.i18n.dir.description=
+lima.config.locale.description=Locale utilisée par l'application
+lima.config.resources.dir.description=
+lima.config.scale.description=
+lima.config.ui.flaunchui.description=
+lima.config.ui.fullscreen.description=Plein écran
+lima.documents=Documents…
+lima.entries=Traitement
+lima.entries.addEntry=Ajouter entrée
+lima.entries.addTransaction=Ajouter transaction
+lima.entries.lettering=Lettrage
+lima.entries.lettering.add=Ajouter une lettre
+lima.entries.lettering.noletterselected=Erreur \: Aucune lettre sélectionnée.
+lima.entries.lettering.radiobutton.list=Lettres existantes
+lima.entries.lettering.radiobutton.new=Nouvelle lettre
+lima.entries.lettering.remove=Supprimer une lettre
+lima.entries.searchtransaction=Rechercher des écritures
+lima.entries.searchunbalancedtransaction=Entrées incorrectes
+lima.entries.writetransaction=Saisir des écritures
+lima.entrybooksreports.documentcreationerror=Erreur lors de la création du document
+lima.entrybooksreports.documentcreationfiscalerror=Impossible de créedr un document quand la période fiscale est ouverte
+lima.entrybooksreports.listerror=Erreur lors de la récupération des données de la liste
+lima.enum.comboboxaccount.account=Compte
+lima.enum.comboboxaccount.accountlist=Liste de comptes
+lima.enum.comboboxaccount.allaccount=Tous les comptes
+lima.enum.comboboxentrybook.all=Tous les journaux
+lima.enum.comboboxentrybook.select_one=Journal
+lima.enum.comboboxletter.all=Toutes les lettres
+lima.enum.comboboxletter.selectone=Lettre
+lima.enum.comboboxoperator.equal=Égal
+lima.enum.comboboxoperator.inferior=Inférieur
+lima.enum.comboboxoperator.inferiororequal=Inférieur ou égal
+lima.enum.comboboxoperator.interval=Intervalle
+lima.enum.comboboxoperator.notequal=Différent
+lima.enum.comboboxoperator.superior=Supérieur
+lima.enum.comboboxoperator.superiororequal=Supérieur ou égal
+lima.enum.comboboxperiod.date=Date
+lima.enum.comboboxperiod.financialperiod=Période Financière
+lima.enum.comboboxperiod.fiscalperiod=Exercice
+lima.enum.comboboxperiod.period=Période
+lima.error.errorpane.htmlmessage=<html><body><b>Une erreur s'est produite</b>\:<br/>%s</body></html>
+lima.financialstatement.accounts=Liste de comptes au crédit et au débit
+lima.financialstatement.addfinancialStatementHeadererror=Erreur lors de l'ajout de l'entête sur la déclaration financière
+lima.financialstatement.check=Vérification des comptes aux postes
+lima.financialstatement.creditaccounts=Liste de comptes au crédit
+lima.financialstatement.debitaccounts=Liste de comptes au débit
+lima.financialstatement.delete=Supprimer le plan BCR actuel avant d'importer
+lima.financialstatement.header.add=Ajouter une catégorie
+lima.financialstatement.headeramount=Calculer le total en en-tete
+lima.financialstatement.label=Libellé
+lima.financialstatement.movement.add=Ajouter un regrouprement
+lima.financialstatement.provisiondeprecationaccounts=Liste de comptes d'amortissement et provisions
+lima.financialstatement.subamount=Calculer un sous-total
+lima.financialstatementreport.listerror=Erreur lors de la récupération des données de la liste
+lima.fiscalperiod.unbalancedtransactions=La période fiscale contient des transactions non équilibrées
+lima.home.entrybooks.create=
+lima.identity=Identité
+lima.identity.address=Adresse
+lima.identity.address2=Adresse (suite)
+lima.identity.businessNumber=SIRET
+lima.identity.city=Ville
+lima.identity.classificationCode=Code NAF
+lima.identity.description=Description
+lima.identity.email=Courriel
+lima.identity.name=Nom
+lima.identity.phoneNumber=n° Tel
+lima.identity.vatNumber=n° TVA
+lima.identity.zipCode=Code Postal
+lima.importexport.choiceencoding=
+lima.importexport.export=
+lima.importexport.export.terminated=
+lima.importexport.usevatpdf=
+lima.init.closed=Lima fermé à %1$s
+lima.init.errorclosing=Erreur lors de la fermeture
+lima.ledger.documentcreationerror=Erreur lors de la création du document
+lima.lettering.listerror=Erreur lors de la récupération des données de la liste
+lima.menu.file=Fichier
+lima.menu.help=Aide
+lima.menu.help.about=À Propos
+lima.menu.help.i18n=Langue
+lima.menu.help.i18n.fr=Français
+lima.menu.help.i18n.uk=Anglais
+lima.menu.help.site=Accéder au site de Lima
+lima.menu.window=Fenêtre
+lima.message.help.usage=Options (set with --option <key> <value>\:
+lima.misc.supportemail.description=Adresse email de support
+lima.openejb.remotemode.description=
+lima.opening.accounts=
+lima.preferences=Préférences
+lima.reports=Rapports
+lima.reports.accounts=Edition compte
+lima.reports.balance=Balance
+lima.reports.entrybooks=Edition journal
+lima.reports.financialstatement=Bilan et Compte de résultat
+lima.reports.ledger=Grand Livre
+lima.reports.vat=Edition TVA
+lima.splash.1=Chargement des services
+lima.splash.2=Chargement de la comptabilité
+lima.splash.3=Application prête \!
+lima.structure=Structure
+lima.tab.home=Accueil
+lima.table.account=Compte
+lima.table.balance=Balance
+lima.table.credit=Crédit
+lima.table.date=Date
+lima.table.debit=Débit
+lima.table.debitcredit=Débit et Crédit
+lima.table.description=Description
+lima.table.entrybook=Journal
+lima.table.grossamount=Brut
+lima.table.label=Libellé
+lima.table.letter=Lettre
+lima.table.move.credit=Mouvement au crédit
+lima.table.move.debit=Mouvement au débit
+lima.table.netamount=Net
+lima.table.number=Numéro de compte
+lima.table.provisiondeprecationamount=Amortissements et provisions
+lima.table.solde=Solde
+lima.table.solde.credit=Solde crédit
+lima.table.solde.debit=Solde débit
+lima.table.voucher=Pièce comptable
+lima.title.about=À propos de Lima...
+lima.title.about.description=Logiciel de comptabilité Libre
+lima.tooltip.filter=<html>Expression régulière \:<br/>- intervalle de compte i..j <br/>- liste de compte i,j,k <br/>- Exclure un compte -i</html>
+lima.tooltip.lettering=<html>Pour ajouter une lettre à plusieurs écritures <br/>Sélectionner plusieurs lignes avec la combinaison ctrl + click</html>
+lima.ui.account.addaccount=Nouveau compte
+lima.ui.account.addaccounttitle=Ajout d'un compte
+lima.ui.account.base=Plan comptable de base
+lima.ui.account.developed=Plan comptable développé
+lima.ui.account.importtitle=Importer
+lima.ui.account.label=Libellé
+lima.ui.account.number=Numéro de compte
+lima.ui.account.removeaccountconfirm=Voulez-vous supprimer le compte %s ?
+lima.ui.account.removeaccounttitle=Suppression d'un compte
+lima.ui.account.shortened=Plan comptable abrégé
+lima.ui.account.updateaccounttitle=Modification d'un compte
+lima.ui.common.amountcredit=Total Crédit
+lima.ui.common.amountdebit=Total Débit
+lima.ui.common.cancel=Annuler
+lima.ui.common.error=Erreur
+lima.ui.common.ok=Ok
+lima.ui.common.refresh=
+lima.ui.common.remove=Supprimer
+lima.ui.common.solde=Solde
+lima.ui.common.update=Modifier
+lima.ui.entrybook.add=Ajout de journal
+lima.ui.entrybook.code=Code
+lima.ui.entrybook.default=Journaux par défault
+lima.ui.entrybook.deletemessage=Êtes vous sûr de vouloir supprimer le journal %s ?
+lima.ui.entrybook.deletetitle=Suppression de journal
+lima.ui.entrybook.entrybooktile=Journal
+lima.ui.entrybook.import=Importer
+lima.ui.entrybook.importtitle=Import
+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=←
+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.block.addretainedearnings=Reporter à nouveau?
+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'exercice
+lima.ui.fiscalperiod.closed=Cloturé
+lima.ui.fiscalperiod.closure=Cloture
+lima.ui.fiscalperiod.fiscalperiod=Exercice
+lima.ui.fiscalperiod.open=Ouvert
+lima.ui.home.account=Plan comptable
+lima.ui.home.chartaccounts.create=Créer le plan des comptes
+lima.ui.home.chartaccounts.modify=Modifier le plan des comptes
+lima.ui.home.chartaccounts.nothing=Aucun compte \!
+lima.ui.home.chartaccounts.state1_2=Le plan comptable possede
+lima.ui.home.chartaccounts.state2_2=comptes
+lima.ui.home.daily=Quotidien
+lima.ui.home.entrybooks=Journaux
+lima.ui.home.entrybooks.create=Créer les journaux
+lima.ui.home.entrybooks.modify=Modifier les journaux
+lima.ui.home.entrybooks.nothing=Aucun journal ouvert \!
+lima.ui.home.entrybooks.state.single=Le journal est \:
+lima.ui.home.entrybooks.state1_2.plural=Les
+lima.ui.home.entrybooks.state2_2.plural=journaux sont \:
+lima.ui.home.fiscalperiod.closed=exercices cloturés
+lima.ui.home.fiscalperiod.create=Créer un exercice
+lima.ui.home.fiscalperiod.modify=Modifier les exercices
+lima.ui.home.fiscalperiod.noopen=Aucun exercice ouvert \!
+lima.ui.home.fiscalperiod.opened=exercices ouverts
+lima.ui.home.fiscalyear=Exercices
+lima.ui.home.transaction.balanced=transactions, toutes sont équilibrées
+lima.ui.home.transaction.create=Ajouter des écritures
+lima.ui.home.transaction.modifiy.balanced=Modifier les écritures
+lima.ui.home.transaction.modifiy.unbalanced=Modifier les écritures incorrectes
+lima.ui.home.transaction.nothing=Aucune écriture
+lima.ui.home.transaction.unbalanced=transactions ne sont pas équilibrées \!
+lima.ui.importexport.accountcharts=Plan des comptes
+lima.ui.importexport.all=Tout
+lima.ui.importexport.csv=Import/Export CSV
+lima.ui.importexport.defaultentrybooks=Journaux par défaut
+lima.ui.importexport.ebp=Import/Export EBP
+lima.ui.importexport.entries=Écritures
+lima.ui.importexport.entrybooks=Journaux
+lima.ui.importexport.export=Export
+lima.ui.importexport.export.terminated=Export terminé
+lima.ui.importexport.financialstatements=Plan BCR
+lima.ui.importexport.import=Importer
+lima.ui.importexport.import.terminated=Import terminé
+lima.ui.importexport.import.vatpdfimport=Le PDF a bien été importé dans le répertoire des ressources de Lima
+lima.ui.importexport.importcsv=Import/Export CSV
+lima.ui.importexport.importebp=Import/Export EBP
+lima.ui.importexport.importerror=
+lima.ui.importexport.importtitle=
+lima.ui.importexport.vatstatements=Plan TVA
+lima.ui.importexport.wait=Traitement en cours…
+lima.ui.importexport.waittitle=Traitement en cours
+lima.ui.mainview.title=Lutin Invoice Monitoring and Accounting
+lima.ui.opening.accounts=<html><center>Veuillez sélectionner un plan par défault, <br/>importer un plan personnalisé<br/> ou annuler pour créer votre propre plan.</center></html>
+lima.ui.opening.close=Fermer
+lima.ui.opening.end=
+lima.ui.opening.entrybook=<html>Cochez la case pour importer les journaux par défaut \:<br/> Achats, Ventes, Trésorerie, Opération diverses</html>
+lima.ui.opening.import=Importer une sauvegarde CSV
+lima.ui.opening.next=Suivant
+lima.ui.opening.title=Initialisation
+lima.ui.opening.welcome=<html><center>Bienvenue dans Lima<br/>Laissez vous guider par cet assistant pour démarrer votre comptabilité en quelques instants
<br/>Ou bien importer directement une ancienne sauvegarde de LIMA au format CSV<br/><br/><br/><br/></center></html>
+lima.vatreport.listerror=Erreur lors de la récupération des données de la liste
+lima.vatstatement.accounts=Liste des comptes
+lima.vatstatement.boxname=PDF BoxName
+lima.vatstatement.delete=Supprimer le plan TVA actuel avant d'importer
+lima.vatstatement.label=Libellé
+lima.vatstatement.mastervatstatement=
+lima.vatstatement.movement.add=Ajouter un regrouprement
+lima.warning.nimbus.landf=Le look and feel nymbus n'a pas été trouvé
+limma.config.thousandseparator.description=
1
0