Methods Summary |
---|
public synchronized boolean | authenticate(java.lang.String uid, java.lang.String pw)
if( isAuthenticated() ) {
logout();
}
try {
SharedUser u = SharedUser.getUser(uid);
u.authenticate(pw);
userID = uid;
return true;
}
catch( AuthenticationException e ) {
return false;
}
|
public synchronized boolean | authorize(int prot)
return (getAuthorization() >= prot);
|
public synchronized boolean | changePassword(java.lang.String opw, java.lang.String npw)
if( !isAuthenticated() ) {
return false;
}
return getSharedUser().changePassword(opw, npw);
|
public synchronized int | getAuthorization()
if( !isAuthenticated() ) {
return 0;
}
return getSharedUser().getAuthorization();
|
public synchronized java.lang.String | getEmail()
if( !isAuthenticated() ) {
return null;
}
return getSharedUser().getEmail();
|
public synchronized java.lang.String | getFirstName()
if( !isAuthenticated() ) {
return null;
}
return getSharedUser().getFirstName();
|
public synchronized java.lang.String | getLastName()
if( !isAuthenticated() ) {
return null;
}
return getSharedUser().getLastName();
|
public synchronized java.util.Locale | getLocale()
Locale loc = getSharedUser().getLocale();
if( loc == null ) {
loc = locale;
if( loc == null ) {
loc = Locale.getDefault();
}
}
return loc;
|
public synchronized java.lang.String | getNickname()
if( !isAuthenticated() ) {
return null;
}
return getSharedUser().getNickname();
|
private SharedUser | getSharedUser()
if( !isAuthenticated() ) {
return null;
}
return SharedUser.getUser(userID);
|
public synchronized java.lang.String | getUserID()
return userID;
|
public synchronized java.lang.String | getWebPage()
if( !isAuthenticated() ) {
return null;
}
return getSharedUser().getWebPage();
|
public synchronized boolean | isAuthenticated()
return (userID != null);
|
public synchronized void | logout()
if( !isAuthenticated() ) {
return;
}
try {
getSharedUser().logout();
}
catch( PersistenceException e ) {
// this should NEVER happen
e.printStackTrace();
}
userID = null;
|
public synchronized void | setLocale(java.util.Locale loc)
locale = loc;
|