All Implemented Interfaces:
javafx.fxml.Initializable

public class PromptDetailsController extends DetailsWindow<Prompt>
Details/edit window controller for a single Prompt. Initializes and populates sample-query and prompt-type selectors (with custom cells, sorted), loads values into controls, validates inputs, and writes changes back on save. Includes contextual help integration.
Since:
1.0
Author:
Felix Seggebäing
  • Constructor Details

    • PromptDetailsController

      public PromptDetailsController(Prompt object)
      Creates a details controller bound to the given Prompt.
      Parameters:
      object - the prompt to display and edit; expected non-null
  • Method Details

    • initialize

      public void initialize(URL location, ResourceBundle resources)
      Initializes the prompt details view: delegates to super.initialize, enables contextual help, and populates the sample query and prompt type combo boxes.
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Overrides:
      initialize in class DetailsWindow<Prompt>
      Parameters:
      location - FXML location (may be null)
      resources - localization bundle (may be null)
      Implementation Note:
      Invoked by the FXML loader on the JavaFX Application Thread.
    • getService

      protected PromptService getService()
      Returns the service used to load and persist prompt objects.
      Specified by:
      getService in class BDOWindow<Prompt>
      Returns:
      the PromptService instance
    • getTitle

      public String getTitle()
      Returns the fixed title for the prompt details window.
      Specified by:
      getTitle in class TitledInitializableWindow
      Returns:
      the string "Prompt"
    • refresh

      protected void refresh()
      Loads the bound Prompt into the controls (text, sample query, and type).
      Specified by:
      refresh in class BDOWindow<Prompt>
      Implementation Note:
      Invoke on the JavaFX Application Thread.
    • saveChecks

      protected List<String> saveChecks()
      Validates the prompt form and returns human-readable errors. Checks: non-empty prompt text, selected sample query, and selected type.
      Overrides:
      saveChecks in class DetailsWindow<Prompt>
      Returns:
      list of validation messages; empty if saving is allowed
    • insertValues

      protected void insertValues()
      Writes the current UI values into the bound Prompt (text, sample query, and type). Does not persist.
      Specified by:
      insertValues in class DetailsWindow<Prompt>