Class EditProfileView
java.lang.Object
org.strassburger.subscriptionmanager.view.profiles.EditProfileView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreadNewName(org.strassburger.tui4j.input.validationrules.ValidationRule<String> nameAlreadyExistsValidationRule) Asks the user to enter a new name for the profile.intselectProfile(List<Profile> profiles) Asks the user to select a profile from a list of profiles.voidvoidvoid
-
Constructor Details
-
EditProfileView
public EditProfileView()
-
-
Method Details
-
sendStartMessage
public void sendStartMessage() -
selectProfile
Asks the user to select a profile from a list of profiles.- Parameters:
profiles- The list of profiles to choose from.- Returns:
- The id of the selected profile.
-
sendNoProfilesMessage
public void sendNoProfilesMessage() -
readNewName
public String readNewName(org.strassburger.tui4j.input.validationrules.ValidationRule<String> nameAlreadyExistsValidationRule) Asks the user to enter a new name for the profile.- Parameters:
nameAlreadyExistsValidationRule- A validation rule that checks if a profile with the given name already exists.- Returns:
- The new name for the profile.
-
sendSuccessMessage
public void sendSuccessMessage()
-