package com.engine.kq.bean;

import weaver.systeminfo.SystemEnv;

import java.util.Map;

/**
 * 右键菜单
 * @wangqs
 * */
public class RightMenu {
	private String menuName;  //名称 
	private String menuFun;		//回调
	private String menuIcon;	//图标
	private RightMenuType type;	// 类型
	private String isTop;	//是否有顶部按钮
	private String isControl ;  //是否受控(即有选中列 才可点击)
	private String isBatch ;  //是否为批量按钮
	private Map<String, Object> params;  //请求附带参数

	public RightMenu(int languageid, RightMenuType type, String menuFun) {
		this.menuName = SystemEnv.getHtmlLabelNames(type.getLabelids(),languageid);
		this.menuFun = menuFun;
		this.menuIcon = type.getIcon();
		this.type = type;
		this.isTop = "0";
	}

	public RightMenu(int languageid, RightMenuType type, String menuFun, Map<String,Object> params) {
		this.menuName = SystemEnv.getHtmlLabelNames(type.getLabelids(),languageid);
		this.menuFun = menuFun;
		this.menuIcon = type.getIcon();
		this.type = type;
		this.isTop = "0";
		this.params = params;
	}

	public RightMenu(int languageid, RightMenuType type, String menuFun, boolean isTop) {
		this.menuName = SystemEnv.getHtmlLabelNames(type.getLabelids(),languageid);
		this.menuFun = menuFun;
		this.menuIcon = type.getIcon();
		this.type = type;
		this.isTop = isTop ? "1" : "0";
	}

	public RightMenu(int languageid, RightMenuType type, String menuFun, boolean isTop, Map<String,Object> params) {
		this.menuName = SystemEnv.getHtmlLabelNames(type.getLabelids(),languageid);
		this.menuFun = menuFun;
		this.menuIcon = type.getIcon();
		this.type = type;
		this.isTop = isTop ? "1" : "0";
		this.params = params;
	}
	
	public RightMenu(int languageid, RightMenuType type, String menuFun,boolean isTop, boolean isBatch) {
		this.menuName = SystemEnv.getHtmlLabelNames(type.getLabelids(),languageid);
		this.menuFun = menuFun;
		this.menuIcon = type.getIcon();
		this.type = type;
		this.isBatch = isBatch ? "1" : "0";
		this.isTop = isTop ? "1" : "0";
	}

	public RightMenu(int languageid, RightMenuType type, String menuFun,boolean isTop, boolean isBatch, Map<String,Object> params) {
		this.menuName = SystemEnv.getHtmlLabelNames(type.getLabelids(),languageid);
		this.menuFun = menuFun;
		this.menuIcon = type.getIcon();
		this.type = type;
		this.isBatch = isBatch ? "1" : "0";
		this.isTop = isTop ? "1" : "0";
		this.params = params;
	}

	public RightMenu() {
		
	}
	public RightMenuType getType() {
		return type;
	}

	public void setType(RightMenuType type) {
		this.type = type;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getMenuFun() {
		return menuFun;
	}

	public void setMenuFun(String menuFun) {
		this.menuFun = menuFun;
	}

	public String getMenuIcon() {
		return menuIcon;
	}

	public void setMenuIcon(String menuIcon) {
		this.menuIcon = menuIcon;
	}

	public String getIsTop() {
		return isTop;
	}

	public void setIsTop(String isTop) {
		this.isTop = isTop;
	}

	public Map<String, Object> getParams() {
		return params;
	}

	public void setParams(Map<String, Object> params) {
		this.params = params;
	}

	public String getIsControl() {
		return isControl;
	}

	public void setIsControl(String isControl) {
		this.isControl = isControl;
	}

	public String getIsBatch() {
		return isBatch;
	}

	public void setIsBatch(String isBatch) {
		this.isBatch = isBatch;
	}
	
}
