Class EpisodeClientController

java.lang.Object
com.esprit.controllers.series.EpisodeClientController
All Implemented Interfaces:
javafx.fxml.Initializable

public class EpisodeClientController extends Object implements javafx.fxml.Initializable
Provides functionality for uploading and viewing episodes of a series, as well as adding feedback to the series. It also initializes a list of episodes and displays them in a ListView. Additionally, it provides methods for playing, pausing, and stopping media players for each episode.
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • iServiceEpisode

      private final IServiceEpisodeImpl iServiceEpisode
    • uploadButton

      private javafx.scene.control.Button uploadButton
    • retour

      private org.kordamp.ikonli.javafx.FontIcon retour
    • uploadSuccessLabel

      private javafx.scene.control.Label uploadSuccessLabel
    • ListEpisode

      private javafx.scene.control.ListView<Episode> ListEpisode
    • imgsrie

      private javafx.scene.image.ImageView imgsrie
    • midiavideo

      private javafx.scene.media.MediaView midiavideo
    • nomlbl

      private javafx.scene.control.Label nomlbl
    • payslbl

      private javafx.scene.control.Label payslbl
    • resumelbl

      private javafx.scene.control.Label resumelbl
    • rirecteurslbl

      private javafx.scene.control.Label rirecteurslbl
    • arreterbtn

      private javafx.scene.control.Button arreterbtn
    • jouerbtn

      private javafx.scene.control.Button jouerbtn
    • pausebtn

      private javafx.scene.control.Button pausebtn
    • txtDescriptionFeedBack

      private javafx.scene.control.TextArea txtDescriptionFeedBack
    • btnSend

      private javafx.scene.control.Button btnSend
    • selectedSerie

      private Series selectedSerie
    • idep

      private Long idep
    • episodes

      private List<Episode> episodes
  • Constructor Details

    • EpisodeClientController

      public EpisodeClientController()
  • Method Details

    • initialize

      public void initialize(Series selectedSerie)
      Sets up the user interface for a media player, initializing buttons and setting listeners for media playback. It also retrieves episode information from a database and displays it in a list view.
      Parameters:
      selectedSerie - selected series for which the functions initializes the image and video components.

      - `getImage()`: String representing the image file path - `getName()`: String representing the series name - `getResume()`: String representing the series summary - `getDirecteur()`: String representing the director's name - `getPays()`: String representing the country of origin

      These properties are used to display the series information in various parts of the user interface.

    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      Is called when an instance of a class is created and initializes an object's resources, such as loading data from a URL or database, by calling the appropriate methods.
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Parameters:
      url - URL of the web application being initialized.
      resourceBundle - resource bundle that contains localized data for the component being initialized.
    • ajouterFeedBack

      void ajouterFeedBack(javafx.event.ActionEvent event)
      Takes a `txtDescriptionFeedBack` text input and adds it to an instance of `IServiceFeedbackImpl`. The date is calculated using the `LocalDate.now()` method, and the `idep` parameter is included in the feedback object.
      Parameters:
      event - user's action of clicking the "Add Feedback" button and triggers the execution of the function.

      - `txtDescriptionFeedBack`: The text field where the user has entered the feedback description.

    • afficherserie

      public void afficherserie(javafx.scene.input.MouseEvent event) throws IOException
      Loads a FXML file, creates a scene, and displays it on a stage, when a mouse event occurs.
      Parameters:
      event - mouse event that triggered the function execution, providing information about the location and type of the event on the user interface.

      - `event`: A `javafx.scene.input.MouseEvent` object representing the mouse event that triggered the function.

      Throws:
      IOException