Class SalesReportGenerator
java.lang.Object
team75.model.SalesReportGenerator
Generates a polished PDF sales summary report.
Dependencies (Maven):
com.itextpdf:itext-core:9.5.0 (type=pom)
com.itextpdf:bouncy-castle-adapter:9.5.0
org.jfree:jfreechart:1.5.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generate(DB.SalesSummary summary, Timestamp start, Timestamp end) Generates the report and returns the raw PDF bytes, ready to be written to a file or streamed as an HTTP response.
-
Constructor Details
-
SalesReportGenerator
public SalesReportGenerator()
-
-
Method Details
-
generate
Generates the report and returns the raw PDF bytes, ready to be written to a file or streamed as an HTTP response.- Parameters:
summary- the aggregated sales datastart- report period start (inclusive)end- report period end (inclusive)- Returns:
- PDF bytes
- Throws:
IOException
-