public class LoginController extends Controller implements ILoginController
Modifier and Type | Field and Description |
---|---|
private IAction |
loginAction |
private IMessageView |
messageView |
Constructor and Description |
---|
LoginController(ILoginView view,
IMessageView messageView)
LoginController constructor
|
Modifier and Type | Method and Description |
---|---|
IAction |
getLoginAction()
Returns the action to be executed when the user logs in
|
ILoginView |
getLoginView() |
IMessageView |
getMessageView() |
void |
register()
Called when the user clicks the "Register" button in the login view
|
void |
setLoginAction(IAction value)
Sets the action to be executed when the user logs in
|
private void |
showMessage(java.lang.String mess)
Shows a message via the message view modal
|
void |
signIn()
Called when the user clicks the "Sign in" button in the login view
|
void |
start()
Displays the login view
|
getView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getView
private IMessageView messageView
private IAction loginAction
public LoginController(ILoginView view, IMessageView messageView)
view
- Login viewmessageView
- Message view (used to display error messages that occur during the login process)public ILoginView getLoginView()
public IMessageView getMessageView()
public void setLoginAction(IAction value)
value
- The action to be executed when the user logs inpublic IAction getLoginAction()
public void start()
ILoginController
start
in interface ILoginController
public void signIn()
ILoginController
signIn
in interface ILoginController
private void showMessage(java.lang.String mess)
mess
- public void register()
ILoginController
register
in interface ILoginController