Package com.lariflix.jemm.reports
Class JellyfinReportInventory
java.lang.Object
com.lariflix.jemm.reports.JellyfinReportInventory
The JellyfinReportInventory class is used to generate inventory reports from a Jellyfin server.
This class retrieves inventory data from the Jellyfin server and formats it into a report.
The report includes details such as the item name, the number of items in each category, and other relevant details.
- Author:
- Cesar Bianchi
-
Constructor Summary
ConstructorsConstructorDescriptionJellyfinReportInventory
(JellyfinInstanceDetails instanceData, JellyfinReportTypes rpType) Constructor for the JellyfinReportInventory class.Constructor for the JellyfinReportInventory class. -
Method Summary
Modifier and TypeMethodDescriptionstatic JellyfinInstanceDetails
Retrieves the instanceData property of the JellyfinReportInventory class.getItems()
Retrieves the items property of this JellyfinReportInventory.void
void
Prints the inventory report.static void
setInstanceData
(JellyfinInstanceDetails instanceData) Sets the instanceData property of the JellyfinReportInventory class.void
Sets the items property of this JellyfinReportInventory.
-
Constructor Details
-
JellyfinReportInventory
Constructor for the JellyfinReportInventory 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
-
JellyfinReportInventory
Constructor for the JellyfinReportInventory 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.JRException- Throws:
IOException
MalformedURLException
org.json.simple.parser.ParseException
net.sf.jasperreports.engine.JRException
-
printReport
public void printReport() throws net.sf.jasperreports.engine.JRException, MalformedURLException, IOExceptionPrints the inventory report. This method generates and prints the inventory report based on the report type. If the report type is INVENTORY_BASIC, it generates a basic report. If the report type is INVENTORY_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
-
getInstanceData
Retrieves the instanceData property of the JellyfinReportInventory class.- Returns:
- A JellyfinInstanceDetails object representing the details of the Jellyfin instance from which to generate the report. This includes the URL, API token, and other necessary details.
- Since:
- 1.1
-
getItems
Retrieves the items property of this JellyfinReportInventory.- Returns:
- A JellyfinReportInventoryStructure object representing the items of this JellyfinReportInventory. This includes the inventory items and their sub-items.
- Since:
- 1.1
-
setInstanceData
Sets the instanceData property of the JellyfinReportInventory class.- Parameters:
instanceData
- A JellyfinInstanceDetails object that should be used as the new instance data for the JellyfinReportInventory class. This includes the URL, API token, and other necessary details.- Since:
- 1.1
-
setItems
Sets the items property of this JellyfinReportInventory.- Parameters:
items
- A JellyfinReportInventoryStructure object that should be used as the new items for this JellyfinReportInventory. This includes the inventory items and their sub-items.- Since:
- 1.1
-