Class ControllerBuilder<T>
java.lang.Object
ai.tutor.cab302exceptionalhandlers.builders.ControllerBuilder<T>
- Type Parameters:
T
- The type of controller to be built.
- Direct Known Subclasses:
AuthControllerBuilder
,ChatControllerBuilder
,ChatSetupControllerBuilder
,QuizControllerBuilder
,UserSettingsControllerBuilder
Abstract base class for all controller builders.
This class provides a common structure for controller factories to dynamically
create their respective controllers, ensuring each builder has access to a
SQLiteConnection
.
- Author:
- Justin.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aControllerBuilder
with the given database connection. -
Method Summary
-
Field Details
-
db
-
-
Constructor Details
-
ControllerBuilder
Constructs aControllerBuilder
with the given database connection.- Parameters:
db
- TheSQLiteConnection
to be used by the builder and the resulting controller.
-
-
Method Details
-
build
Abstract method to build the controller.Subclasses must implement this method to return an instance of the controller of type
<T>
, configured with parameters set via the builder's methods.- Returns:
- The built controller.
- Throws:
Exception
- if an error occurs during the controller construction process.
-