Class JellyfinUtilFunctions

java.lang.Object
com.lariflix.jemm.utils.JellyfinUtilFunctions

public class JellyfinUtilFunctions extends Object
Utility class for Jellyfin related functions. This class provides utility methods that can be used across the application.
Since:
1.0
Author:
Cesar Bianchi
  • Constructor Details

    • JellyfinUtilFunctions

      public JellyfinUtilFunctions()
      Default constructor for the JellyfinUtilFunctions class. This constructor is used when creating a new instance of this class without setting any initial values.
      Since:
      1.0
  • Method Details

    • eraseModel

      public DefaultTableModel eraseModel(DefaultTableModel model)
      Erases all rows from the given DefaultTableModel. This method is used to clear a table model.
      Parameters:
      model - The DefaultTableModel to be cleared.
      Returns:
      The cleared DefaultTableModel.
      Since:
      1.0
    • extractFileFromJar

      public boolean extractFileFromJar(String originName, String destName)
      Extracts a resource-file from a JAR and saves it to a temporary dir location.
      Parameters:
      originName - The name of the file to be extracted from the JAR file. This should include the path to the file inside the JAR file.
      destName - The name of the file to be saved. This should include the path to the location where the file should be saved.
      Returns:
      A boolean value indicating whether the file was successfully extracted and saved. Returns true if the operation was successful, and false otherwise.
      Throws:
      IOException - If there is an error reading the file from the JAR file or writing the file to the specified location.
      Since:
      1.1
    • getJRXMLLocalPath

      public String getJRXMLLocalPath()
      Retrieves the local path for the JRXML files. This method returns a hardcoded string representing the local path for the JRXML files. This path is used for debugging purposes.
      Returns:
      A string representing the local path for the JRXML files.
      Since:
      1.1
    • getJRXMLResourcePath

      public String getJRXMLResourcePath()
      Retrieves the resource path for the JRXML files. This method returns a hardcoded string representing the resource path for the JRXML files. This path is used to locate the JRXML files within the application's resources.
      Returns:
      A string representing the resource path for the JRXML files.
      Since:
      1.1