Class ChatSetupControllerBuilder

java.lang.Object
ai.tutor.cab302exceptionalhandlers.builders.ControllerBuilder<ChatSetupController>
ai.tutor.cab302exceptionalhandlers.builders.ChatSetupControllerBuilder

public class ChatSetupControllerBuilder extends ControllerBuilder<ChatSetupController>
Builder for creating instances of ChatSetupController.

This class allows for the construction of either a ChatCreateController or a ChatUpdateController based on the specified ChatSetupType. It requires the current user and, for updates, the specific chat to be modified.

Usage Example (Create):

 ChatSetupController createController = controllerFactory.chatSetupController()
                                          .currentUser(user)
                                          .type(ChatSetupType.CREATE)
                                          .build();
 

Usage Example (Update):

 ChatSetupController updateController = controllerFactory.chatSetupController()
                                          .currentUser(user)
                                          .type(ChatSetupType.UPDATE)
                                          .currentChat(chatToUpdate)
                                          .build();
 
Author:
Justin.
See Also: