Package com.lariflix.jemm.reports
Class JellyfinReportGenres
java.lang.Object
com.lariflix.jemm.reports.JellyfinReportGenres
The JellyfinReportGenres class is used to generate genre reports from a Jellyfin server.
This class retrieves genre data from the Jellyfin server and formats it into a report.
The report includes details such as the genre name, the number of items in each genre, and other relevant details.
- Author:
- Cesar Bianchi
-
Constructor Summary
ConstructorsConstructorDescriptionJellyfinReportGenres
(JellyfinInstanceDetails instanceData, JellyfinReportTypes rpType) Constructor for the JellyfinReportGenres class.Constructor for the JellyfinReportGenres class. -
Method Summary
Modifier and TypeMethodDescriptiongetItems()
Retrieves the items property of this JellyfinReportGenres.void
Loads the report items.void
Prints the genre report.
-
Constructor Details
-
JellyfinReportGenres
Constructor for the JellyfinReportGenres class.- Parameters:
rpType
- A JellyfinReportTypes object representing the type of report to generate. This could be any of the types defined in the JellyfinReportTypes class.- Since:
- 1.1
-
JellyfinReportGenres
Constructor for the JellyfinReportGenres class.- Parameters:
instanceData
- A JellyfinInstanceDetails object containing the details of the Jellyfin instance from which to generate the report. This includes the URL, API token, and other necessary details.rpType
- A JellyfinReportTypes object representing the type of report to generate. This could be any of the types defined in the JellyfinReportTypes class.- Since:
- 1.1
-
-
Method Details
-
loadReportItems
public void loadReportItems() throws IOException, MalformedURLException, org.json.simple.parser.ParseException, net.sf.jasperreports.engine.JRExceptionLoads the report items. This method loads the report items based on the report type. If the report type is GENRES_BASIC, it loads the items. If the report type is GENRES_FULL, it loads the items and the sub-items.- Throws:
IOException
- If an I/O error occurs. This can happen if there's a problem with the network connection, the server, or the local machine.MalformedURLException
- If the URL of the Jellyfin server is not formatted correctly.org.json.simple.parser.ParseException
- If there is an error parsing the server's response. This can happen if the server's response does not match the expected format.net.sf.jasperreports.engine.JRException
- If there is an error generating the report. This can happen if there's a problem with the report template, the data, or the JasperReports engine.- Since:
- 1.1
-
printReport
public void printReport() throws net.sf.jasperreports.engine.JRException, MalformedURLException, IOExceptionPrints the genre report. This method generates and prints the genre report based on the report type. If the report type is GENRES_BASIC, it generates a basic report. If the report type is GENRES_FULL, it generates a full report with sub-items. The method first compiles the report, then sets the data source and report parameters, and finally fills the report and shows it.- Throws:
net.sf.jasperreports.engine.JRException
- If there is an error generating the report. This can happen if there's a problem with the report template, the data, or the JasperReports engine.MalformedURLException
- If the URL of the Jellyfin server is not formatted correctly.IOException
- If an I/O error occurs. This can happen if there's a problem with the network connection, the server, or the local machine.- Since:
- 1.1
-
getItems
Retrieves the items property of this JellyfinReportGenres.- Returns:
- A JellyfinReportGenresStructure object representing the items of this JellyfinReportGenres. This includes the genre items and their sub-items.
- Since:
- 1.1
-