UserProfile

package com.hongyi.oms.framework.safety;

import java.util.Date;
import java.util.Collection;
/**
* <p>Title: 用户信息接口</p>
* <p>Description: 描述一个用户信息。用于安全验证</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author <a href=mailto:wolf_chy@sina.com>Steven Cheng</a>
* @version 1.0
*/
public interface UserProfile {

public static final String USERINFO = "UserInfo";

/**
* 该用户是否登录
* @return
*/
public boolean isLogin();

/**
* 得到用户的personId
* @return
*/
public int getPersonId();

/** 是否是管理员
* @return
*/
public boolean isAdmin();

/**
* 得到用户姓名
* @return
*/
public String getFullname();

/**
* 得到所属部门ID
* @return
*/
public int getDeptId();

/**
* Author: Yang Ning
* @return
*/
public String getDeptName();

/**
* Author: Yang Ning
* @return
*/
public String getTitleCode();

/**
* Author: Yang Ning
* @return
*/
public String getTitleName();
/**
* 得到上次登录时间
* @return
*/
public Date getRecentLoginTime();

/**
* 得到地区信息
* @return
*/
public String getCity();

/**
* 得到所属专业
* @return
*/
public String getService();

/**
* 设置用户信息
* @param name
* @param value
*/
public void setAttribute(String name,Object value);

/**
* 得到用户信息
* @param name
* @return
*/
public Object getAttribute(String name);

/**
* 是否有这个名字的属性值
* @return
*/
public boolean containsName(String name);

/**
* 得到所有属性值的名字
* @return
*/
public Collection getAttributeNames();

/**
* Get account of current user
* @return
*/
public String getAccount();

}

你可能感兴趣的:(profile)