package com.sa.ibiz.demo.ibizutil.service;

import java.util.HashMap;
import java.util.Map;
import lombok.Data;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;

@Data
public abstract class SearchFilterBase  {

	public Map<String,String> sessioncontext;	 //用户上下文
	public Map<String,String> srfparentdata;	 //父业务数据

	/**
	 * 获取用户上下文
	 * @param
	 */
	public Map getSessioncontext() {
	    AuthenticationUser curuser=AuthenticationUser.getAuthenticationUser();
		if(curuser!=null)
		    sessioncontext =curuser.getSessionParams();
		else
		    sessioncontext =new HashMap();
		return sessioncontext;
	}
	/**
	 * 设置用户上下文
	 * @param sessioncontext
	 */
	public void setSessioncontext(Map sessioncontext) {
		this.sessioncontext = sessioncontext;
	}
	/**
	 * 获取数据上下文
	 * @return
	 */
	public Map<String, String> getDatacontext() {
		return srfparentdata;
	}
	/**
	 * 获取网页请求上下文
	 * @return
	 */
	public Map<String, String> getWebcontext() {
		return srfparentdata;
	}
}