Class MovieDataConsoleReader

java.lang.Object
sources.client.MovieDataConsoleReader

public class MovieDataConsoleReader extends Object
The MovieDataConsoleReader class provides static methods for reading movie data from console input. The class provides methods for reading movie name, coordinates, oscars count, genre, MPAA rating, and director name from console input.
  • Constructor Details

    • MovieDataConsoleReader

      public MovieDataConsoleReader()
  • Method Details

    • readMovieName

      public static String readMovieName(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the movie name from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The movie name entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readX

      public static Integer readX(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the X coordinate from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The X coordinate entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readY

      public static Integer readY(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the Y coordinate from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The Y coordinate entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readOscrasCount

      public static long readOscrasCount(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the oscarsCount from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The oscarsCount entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readMovieGenre

      public static MovieGenre readMovieGenre(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the movie genre from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The movie genre entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readMpaaRating

      public static MpaaRating readMpaaRating(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the MPAA rating from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The MPAA rating entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readDirectorName

      public static String readDirectorName(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the director name from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The director name entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readBirthday

      public static LocalDateTime readBirthday(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the director birthday from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The director birthday entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readWeight

      public static Integer readWeight(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the director weight from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The director weight entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.
    • readPassportID

      public static String readPassportID(BasicReader basicReader, boolean inScriptMode) throws InvalidScriptException
      Reads the director passport ID from console input using a BasicReader instance.
      Parameters:
      basicReader - The BasicReader instance used for reading input from the console.
      inScriptMode - Boolean flag indicating whether the method is running in script mode.
      Returns:
      The director passport ID entered by the user.
      Throws:
      InvalidScriptException - If the method is running in script mode and the input is invalid.