Class JellyfinReportYears

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

public class JellyfinReportYears extends Object
The JellyfinReportYears class is used to represent years in a report. This class contains the details of a year, such as the name and other relevant details. It also contains a list of items associated with the year, if any. It provides methods to set and retrieve these details.
Author:
Cesar Bianchi
  • Constructor Details

    • JellyfinReportYears

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

      public JellyfinReportYears(JellyfinInstanceDetails instanceData, JellyfinReportTypes rpType)
      Constructor for the JellyfinReportYears class. This constructor initializes a new instance of the JellyfinReportYears 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 YEARS_BASIC or YEARS_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 JellyfinReportYears. This method loads the items for this JellyfinReportYears by calling the loadItems method. It doesn't perform any other specific actions. 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 JellyfinReportYears. This method generates and displays a report based on the report type. It 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 JellyfinReportYears, 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.1
    • getItems

      public JellyfinReportYearsStructure getItems()
      Retrieves the items property of this JellyfinReportYears.
      Returns:
      A JellyfinReportYearsStructure object representing the items of this JellyfinReportYears. Each item in the JellyfinReportYearsStructure represents a year in the report.
      Since:
      1.1