|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.sillyview.Widget net.sourceforge.pavlov.controllers.LoginController
public class LoginController
Creates and manages model, view, and controller for the Logon system.
Field Summary | |
---|---|
static String |
CHOOSE_ANOTHER_PASSWORD
Token for communicating with velocity model |
static String |
CREATE
Token for communicating with velocity model |
static String |
CREATE_NEW_USER
Token for communicating with velocity model |
static String |
ERROR
|
static String |
MODE
Token for communicating with velocity model |
static String |
NAME_IN_USE
Token for communicating with velocity model |
static String |
PASSWORD
Token for communicating with velocity model |
static String |
USER_NAME
Token for communicating with velocity model |
static String |
WRONG_PASSWORD
Token for communicating with velocity model |
Fields inherited from class net.sourceforge.sillyview.Widget |
---|
view |
Constructor Summary | |
---|---|
LoginController(WidgetView vu)
|
Method Summary | |
---|---|
void |
addLogonListener(LogonListener l)
Adds a LogonListener. |
void |
addTokens(HashMap<Object,Object> map)
|
protected User |
createNewUser(String username,
String pass)
Creates a new user with the given name and password. |
protected boolean |
goodPassword(String name,
String pass)
Returns true if the user file exists, and its password is equal to the one provided. |
void |
hyperlinkUpdate(HyperlinkEvent e)
Catches the form submit event, and makes a login attempt from it. |
void |
logonAttempt(LogonEvent event)
Description of the Method |
protected void |
notify(LogonEvent e)
Notify listeners that a logonevent has occured. |
protected LogonEvent |
parseURL(String url)
Converts the URL command to a LogonEvent. |
void |
setToken(String nam,
String val)
Sets the given token to the given value in the backing model. |
protected void |
startSession(User u)
Notifies listeners that the user has successfully logged in and closes the Login view. |
protected boolean |
userNameExists(String name)
Returns true if a file exists for the given user. |
Methods inherited from class net.sourceforge.sillyview.Widget |
---|
getView, setView |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CHOOSE_ANOTHER_PASSWORD
public static final String CREATE_NEW_USER
public static final String NAME_IN_USE
public static final String PASSWORD
public static final String USER_NAME
public static final String WRONG_PASSWORD
public static final String MODE
public static final String CREATE
public static final String ERROR
Constructor Detail |
---|
public LoginController(WidgetView vu) throws Exception
Exception
Method Detail |
---|
protected boolean userNameExists(String name)
protected boolean goodPassword(String name, String pass)
name
- Username to checkpass
- Password provided by user
protected User createNewUser(String username, String pass)
username
- Description of the Parameterpass
- Description of the Parameter
protected void startSession(User u)
u
- Description of the Parameterpublic void logonAttempt(LogonEvent event)
logonAttempt
in interface LogonListener
event
- Description of the Parameterpublic void setToken(String nam, String val)
n
- The new token keyv
- The new token valuepublic void addTokens(HashMap<Object,Object> map)
protected LogonEvent parseURL(String url)
url
- Description of the Parameter
public void hyperlinkUpdate(HyperlinkEvent e)
hyperlinkUpdate
in interface HyperlinkListener
e
- Description of the Parameterprotected void notify(LogonEvent e)
e
- Description of the Parameterpublic void addLogonListener(LogonListener l)
l
- The feature to be added to the LogonListener attribute
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |