Class JellyfinReportPeople

java.lang.Object
com.lariflix.jemm.reports.JellyfinReportPeople

public class JellyfinReportPeople extends Object
The JellyfinReportPeople class is used to represent people in a report. This class contains the details of a person, such as the name, role, and other relevant details. It provides methods to set and retrieve these details.
Author:
Cesar Bianchi
  • Constructor Details

    • JellyfinReportPeople

      public JellyfinReportPeople(JellyfinReportTypes rpType)
      Constructor for the JellyfinReportPeople class. This constructor initializes a new instance of the JellyfinReportPeople class with the given report type.
      Parameters:
      rpType - A JellyfinReportTypes object representing the type of report to generate. This could be either PEOPLE_BASIC or PEOPLE_FULL.
      Since:
      1.1
    • JellyfinReportPeople

      public JellyfinReportPeople(JellyfinInstanceDetails instanceData, JellyfinReportTypes rpType)
      Constructor for the JellyfinReportPeople class. This constructor initializes a new instance of the JellyfinReportPeople class with the given instance data and report type.
      Parameters:
      instanceData - 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.
      rpType - A JellyfinReportTypes object representing the type of report to generate. This could be either PEOPLE_BASIC or PEOPLE_FULL.
      Since:
      1.1
  • Method Details

    • loadReportItems

      public void loadReportItems() throws IOException, MalformedURLException, org.json.simple.parser.ParseException, net.sf.jasperreports.engine.JRException
      Loads the report items for this JellyfinReportPeople. This method loads the items for this JellyfinReportPeople based on the report type. If the report type is PEOPLE_BASIC, it only loads the items. If the report type is PEOPLE_FULL, it loads both the items and the episodes. This method throws an IOException if there is a problem with the input or output, a MalformedURLException if the URL of the Jellyfin instance is not formatted correctly, a ParseException if there is a problem with parsing the data, and a JRException if there is a problem with generating the report.
      Throws:
      IOException - If there is a problem with the input or output.
      MalformedURLException - If the URL of the Jellyfin instance is not formatted correctly.
      org.json.simple.parser.ParseException - If there is a problem with parsing the data.
      net.sf.jasperreports.engine.JRException - If there is a problem with generating the report.
      Since:
      1.1
    • printReport

      public void printReport() throws net.sf.jasperreports.engine.JRException, MalformedURLException, IOException
      Prints the report for this JellyfinReportPeople. This method generates and displays a report based on the report type. If the report type is PEOPLE_BASIC, it generates a basic report. If the report type is PEOPLE_FULL, it generates a full report with sub-items. The method first determines the paths for the report files, then compiles the report based on the report type. If the application is running in debug mode, it uses local files. Otherwise, it uses embedded resources. After compiling the report, it sets the data source to the items of this JellyfinReportPeople, sets the report parameters, fills the report with data, and displays the report in a new JasperViewer. This method throws a JRException if there is a problem with generating the report, a MalformedURLException if the URL of the Jellyfin instance is not formatted correctly, and an IOException if there is a problem with the input or output.
      Throws:
      net.sf.jasperreports.engine.JRException - If there is a problem with generating the report.
      MalformedURLException - If the URL of the Jellyfin instance is not formatted correctly.
      IOException - If there is a problem with the input or output.
      Since:
      1.0
    • getItems

      public JellyfinReportPeopleStructure getItems()
      Retrieves the items property of this JellyfinReportPeople.
      Returns:
      A JellyfinReportPeopleStructure object representing the items of this JellyfinReportPeople. Each item in the JellyfinReportPeopleStructure represents a person in the report.
      Since:
      1.0