Class JobPortalCLI

java.lang.Object
me.josephsf.jobportaljosephsfeir.cli.JobPortalCLI
All Implemented Interfaces:
org.springframework.boot.CommandLineRunner

@Component public class JobPortalCLI extends Object implements org.springframework.boot.CommandLineRunner
JobPortalCLI - A command-line client for interacting with the Job Portal API.

This class implements a text-based interface for users to interact with the Job Portal system. It provides functionality for both candidates (job seekers) and recruiters. The client communicates with the Job Portal RESTful API to perform CRUD operations on the MongoDB database.

Features include:

  • User authentication (login/register)
  • Profile management for candidates and recruiters
  • Job posting and application management
  • Job searching and browsing
  • Application status tracking and updating
Since:
2025-05-14
  • Constructor Details

    • JobPortalCLI

      public JobPortalCLI()
      Constructs a new JobPortalCLI instance. Initializes the REST client and configures the API base URL. The base URL can be overridden using the system property "api.base.url".
  • Method Details

    • run

      public void run(String... args) throws Exception
      Entry point for the command-line client. This method is called by Spring Boot when the application starts. It displays the main menu and handles user input in a loop until exit.
      Specified by:
      run in interface org.springframework.boot.CommandLineRunner
      Parameters:
      args - Command line arguments (not used)
      Throws:
      Exception - If an error occurs during execution