BrightSide Workbench Full Report + Source Code
org.turro.financials.book.ExpensesBook Class Reference
Inheritance diagram for org.turro.financials.book.ExpensesBook:
Collaboration diagram for org.turro.financials.book.ExpensesBook:

Public Member Functions

void download ()
 
InputStream getExcel (String sheetName)
 

Static Public Member Functions

static ExpensesBook from (int year)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 52 of file ExpensesBook.java.

Member Function Documentation

◆ download()

void org.turro.financials.book.ExpensesBook.download ( )

Definition at line 54 of file ExpensesBook.java.

54  {
55  String name = ElephantContext.getSiteName() + "_ExpensesBook.xls";
56  Filedownload.save(getExcel(name), new MimetypesFileTypeMap().getContentType(name), name);
57  }
InputStream getExcel(String sheetName)
Here is the call graph for this function:

◆ from()

static ExpensesBook org.turro.financials.book.ExpensesBook.from ( int  year)
static

Definition at line 133 of file ExpensesBook.java.

133  {
134  return new ExpensesBook(year);
135  }

◆ getExcel()

InputStream org.turro.financials.book.ExpensesBook.getExcel ( String  sheetName)

Definition at line 59 of file ExpensesBook.java.

59  {
60  try {
61  ByteArrayOutputStream baos = new ByteArrayOutputStream();
62  WritableWorkbook ww = Workbook.createWorkbook(baos);
63  WritableSheet ws = ww.createSheet(sheetName, 0);
64  writeSheet(ws);
65  ww.write();
66  ww.close();
67  baos.close();
68  return new ByteArrayInputStream(baos.toByteArray());
69  } catch (WriteException | IOException ex) {
70  WebLoggers.severe(this).exception(ex).log();
71  }
72  return null;
73  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: