Package main.domain.contexts.user
Class UserRegistering
java.lang.Object
main.domain.contexts.user.UserRegistering
- All Implemented Interfaces:
Context
- Direct Known Subclasses:
AdminRegistering
Allows registering a User into a Repository.
-
Constructor Summary
ConstructorDescriptionUserRegistering
(Users repository) Constructor that initializes the repository. -
Method Summary
Modifier and TypeMethodDescriptionSets the login information for the user.Sets the personal information for the user.void
register()
Registers the user in the repository.
-
Constructor Details
-
UserRegistering
Constructor that initializes the repository.- Parameters:
repository
- the users repository
-
-
Method Details
-
login
Sets the login information for the user.- Parameters:
login
- the login information- Returns:
- the updated UserRegistering object
-
person
Sets the personal information for the user.- Parameters:
person
- the personal information- Returns:
- the updated UserRegistering object
-
register
Registers the user in the repository.- Throws:
EmailAlreadyExists
- if the email is already registered
-