All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tmsps.ne4Weixin.api.entity.menu.Menu Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
package com.tmsps.ne4Weixin.api.entity.menu;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;
import com.tmsps.ne4Weixin.api.entity.BaseModel;

public class Menu extends BaseModel {
	// 一级菜单最多三个
	@JSONField(name = "button")
	private List menuButton = new ArrayList();

	public List getMenuButton() {
		return menuButton;
	}

	public void setMenuButton(List menuButton) {
		if (null == menuButton || menuButton.size() > 3) {
			throw new IllegalArgumentException("一级菜单最多只有3个");
		}
		this.menuButton = menuButton;
	}

	public void addMenuButton(MenuButton mb) {
		this.menuButton.add(mb);
		if (this.menuButton.size() > 3) {
			throw new IllegalArgumentException("一级菜单最多只有3个");
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy