public class LoginController extends Controller
Modifier and Type | Field and Description |
---|---|
private UserDB |
database |
private LoginView |
view |
master
Constructor and Description |
---|
LoginController(ControllerMaster master) |
Modifier and Type | Method and Description |
---|---|
private boolean |
areCredentialsCorrect(User newUser)
Consults the database to see if the credentials of a user are
correct.
|
private void |
connectUser(User user)
Connects a user to the application
|
void |
login(java.lang.String userName,
java.lang.String password)
Checks if the credentials for a user are correct
If so, connect the user to the app.
|
void |
showRegister()
Shows the register view
|
isHelpOpen, onHelpViewStatusChanged
public LoginController(ControllerMaster master)
public void login(java.lang.String userName, java.lang.String password)
userName
- password
- private void connectUser(User user)
user
- The user to connectprivate boolean areCredentialsCorrect(User newUser) throws DatabaseException
newUser
- DatabaseException
public void showRegister()