package org.onetwo.common.web.userdetails;

import java.io.Serializable;


@SuppressWarnings("serial")
public class SimpleUserDetail implements SsoTokenable, UserDetail, UserRoot, Serializable {
	
	private long userId;
	private String userName;
	private String token;

	public SimpleUserDetail(){ 
	}
	
	public SimpleUserDetail(long userId, String userName, String token) {
		super();
		this.userId = userId;
		this.userName = userName;
		this.token = token;
	}



	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder("{");
		sb.append("userName:").append(userName)
		.append(",token:").append(token)
		.append("}");
		return sb.toString();
	}

	@Override
	public boolean isSystemRootUser() {
		return false;
	}
	
	
}

@@ -67,17 +67,16 @@
 zable;%0A%0A
-%0A
 @Suppres
@@ -139,22 +139,8 @@
 ents
- SsoTokenable,
  Use
@@ -223,16 +223,18 @@
 erName;%0A
+//
 %09private
@@ -340,22 +340,8 @@
 Name
-, String token
 ) %7B%0A
@@ -407,144 +407,8 @@
 me;%0A
-%09%09this.token = token;%0A%09%7D%0A%0A%0A%0A%09public String getToken() %7B%0A%09%09return token;%0A%09%7D%0A%0A%09public void setToken(String token) %7B%0A%09%09this.token = token;%0A
 %09%7D%0A%0A
@@ -654,201 +654,8 @@
 %09%7D%0A%0A
-%09public String toString()%7B%0A%09%09StringBuilder sb = new StringBuilder(%22%7B%22);%0A%09%09sb.append(%22userName:%22).append(userName)%0A%09%09.append(%22,token:%22).append(token)%0A%09%09.append(%22%7D%22);%0A%09%09return sb.toString();%0A%09%7D%0A%0A
 %09@Ov
@@ -711,20 +711,47 @@
 urn 
-false
+UserRoot.ROOT_USER_ID==getUserId()
 ;%0A%09%7D%0A%09%0A
-%09%0A
 %7D%0A

fix simple user detail