sync
[Bookkeeping.git] / src / com / interrupt / bookkeeping / users / User.java
blobd0cb4fd3d17a85210f6f1d94353117864e0a92eb
1 package com.interrupt.bookkeeping.users;
3 import org.apache.log4j.Logger;
5 import com.interrupt.bookkeeping.users.GUser;
8 public class User extends GUser implements IUser {
11 private Logger logger = Logger.getLogger(User.class);
12 //private boolean authenticated = false;
13 private Thread sessionThread = null;
14 private IUserSession usession = null;
16 public boolean isAuthenticated() {
18 if(this.getAuthenticated().equals("true")) {
19 return true;
21 return false;
23 public void setAuthenticated(boolean authenticated) {
25 logger.debug("User:: setAuthenticated["+ authenticated +"]");
27 if(authenticated) {
28 this.setAuthenticated("true");
30 else {
31 this.setAuthenticated("false");
37 public void setUserSession(IUserSession usession) {
38 this.usession = usession;
39 this.removeAllUserSession();
40 this.addUserSession(usession);
42 public IUserSession getUserSession() {
43 return this.usession;
46 public void startSession() {
48 //((UserSession)usession).setStartTime(java.lang.System.currentTimeMillis());
49 sessionThread = new Thread((UserSession)usession);
50 sessionThread.start();