r3449 - trunk/lima-business/src/main/java/org/chorem/lima/business/ejb
Author: echatellier Date: 2012-06-06 16:06:43 +0200 (Wed, 06 Jun 2012) New Revision: 3449 Url: http://chorem.org/repositories/revision/lima/3449 Log: Add doc Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2012-06-06 13:36:35 UTC (rev 3448) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/DocumentServiceImpl.java 2012-06-06 14:06:43 UTC (rev 3449) @@ -34,7 +34,6 @@ import java.io.FileOutputStream; import java.io.InputStream; import java.math.BigDecimal; -import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Date; @@ -321,7 +320,7 @@ } } - public Table createFinancialStatementsHeaderTable() { + protected Table createFinancialStatementsHeaderTable() { Table t = null; try { t = new Table(4, 1); @@ -351,7 +350,7 @@ } - public Table createFinancialStatementsTable(List<FinancialStatementAmounts> financialStatementAmounts) { + protected Table createFinancialStatementsTable(List<FinancialStatementAmounts> financialStatementAmounts) { int nbrow = financialStatementAmounts.size(); Table t = null; try { @@ -576,7 +575,7 @@ } } - public Table createLedgerHeaderTable() { + protected Table createLedgerHeaderTable() { Table t = null; try { t = new Table(7, 1); @@ -605,7 +604,7 @@ } - public Table createLedgerTable(List<Object> subList) { + protected Table createLedgerTable(List<Object> subList) { int nbrow = subList.size(); Table t = null; try { @@ -683,7 +682,7 @@ return t; } - public Table createLedgerAmountTable(String account, + protected Table createLedgerAmountTable(String account, String title, BigDecimal debit, BigDecimal credit) { @@ -832,7 +831,7 @@ } } - public Table createEntryBooksHeaderTable() { + protected Table createEntryBooksHeaderTable() { Table t = null; try { t = new Table(6, 1); @@ -900,7 +899,7 @@ return t; } - public Table createEntryBooksAmountTable(String title, + protected Table createEntryBooksAmountTable(String title, BigDecimal credit, BigDecimal debit) { Table t = null; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-06-06 13:36:35 UTC (rev 3448) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/HttpServerServiceImpl.java 2012-06-06 14:06:43 UTC (rev 3449) @@ -107,14 +107,14 @@ } } - @Override public int getHttpPort() { return port; } - - /** this servlet send a static html page */ + /** + * This servlet send a static html page. + */ public class MainServlet extends HttpServlet { private static final long serialVersionUID = 1L; @@ -145,8 +145,7 @@ //if doc pdf or html else if (model != null && format != null && beginDate != null && endDate != null) { FormatsEnum formatsEnum = FormatsEnum.valueOfExtension(format); - URL doc = new URL("file:" + path + File.separator - + model + formatsEnum.getExtension()); + //create docs try { Date beginDateFormat = DATEFORMAT.parse(beginDate); @@ -184,6 +183,12 @@ } catch (ParseException eeePE) { log.error("Can't parse date", eeePE); } + + // FIXME echatellier 20120606 on connait le fichier + // ou sera généré le rapport, et on peut donc le relire + // après génération + // fonctionne pour le moment, mais a modifier + URL doc = new URL("file:" + path + File.separator + model + formatsEnum.getExtension()); resp.setContentType(formatsEnum.getMimeType()); InputStream in = doc.openStream(); OutputStream out = resp.getOutputStream(); @@ -276,8 +281,6 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); - } } - }
participants (1)
-
echatellier@users.chorem.org