import java.util.HashMap;
import java.util.Map;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import org.codehaus.jackson.annotate.JsonIgnore;
@MappedSuperclass
public class MenuDefinition {
/**
* menu's unique id.
* <p>
* 建议使用包格式
* </p>
*/
String id;
/**
* 菜单显示标签,一个简短的字符串.
*/
String label;
/**
* 与上一级菜单的关联. 这是一个弱关联的关系。除了参考id以外还能够使用位置表达式。
*
*/
String parentId;
/**
* 同级菜单排序,二维表格没有顺序值,所以需要记录,默认值应该是0.
*/
Integer seq = 0;
/**
* 描述字段,详细描述label。.
*
*/
String tooltip;
/**
* 菜单功能键,一个标准的URI表达式。.
*/
String URI;
/**
* 菜单图标地址,URL表达式。.
*/
String icon;
/**
* 类别,用来对菜单子类做区分。.
*/
String type;
/**
* 上下文帮助id.一个字符串.
*/
String helpContextId;
/**
* Available,一个条件表达式,用来计算菜单在当前的上下文中是否能够显示。.
*/
String available;
/**
* 助记符,单个字母的快捷键提示。.
*/
String mnemonic;
/**
* 可扩展的字段.
*
*/
Map<String, Object> extra = new HashMap<String, Object>(5);
public MenuDefinition() {
}
/**
* Gets the available,一个条件表达式,用来计算菜单在当前的上下文中是否能够显示。.
*
* @return the available,一个条件表达式,用来计算菜单在当前的上下文中是否能够显示。
*/
public String getAvailable() {
return available;
}
/**
* Sets the available,一个条件表达式,用来计算菜单在当前的上下文中是否能够显示。.
*
* @param available
* the new available,一个条件表达式,用来计算菜单在当前的上下文中是否能够显示。
*/
public void setAvailable(String available) {
this.available = available;
}
/**
* Gets the menu's unique id.
*
* @return the menu's unique id
*/
@Id
public String getId() {
return id;
}
/**
* Sets the menu's unique id.
*
* @param id
* the new menu's unique id
*/
public void setId(String id) {
this.id = id;
}
/**
* Gets the 菜单显示标签,一个简短的字符串.
*
* @return the 菜单显示标签,一个简短的字符串
*/
public String getLabel() {
return label;
}
/**
* Sets the 菜单显示标签,一个简短的字符串.
*
* @param label
* the new 菜单显示标签,一个简短的字符串
*/
public void setLabel(String label) {
this.label = label;
}
/**
* Gets the 与上一级菜单的关联.
*
* @return the 与上一级菜单的关联
*/
public String getParentId() {
return parentId;
}
/**
* Sets the 与上一级菜单的关联.
*
* @param parentId
* the new 与上一级菜单的关联
*/
public void setParentId(String parentId) {
this.parentId = parentId;
}
/**
* Gets the 同级菜单排序,二维表格没有顺序值,所以需要记录。.
*
* @return the 同级菜单排序,二维表格没有顺序值,所以需要记录。
*/
public int getSeq() {
return seq;
}
/**
* Sets the 同级菜单排序,二维表格没有顺序值,所以需要记录。.
*
* @param seq
* the new 同级菜单排序,二维表格没有顺序值,所以需要记录。
*/
public void setSeq(Integer seq) {
if (seq != null) {
this.seq = seq;
}
}
/**
* Sets the 同级菜单排序,二维表格没有顺序值,所以需要记录。.
*
* @param seq
* the new 同级菜单排序,二维表格没有顺序值,所以需要记录。
*/
@JsonIgnore
public void setSeq(int seq) {
this.seq = seq;
}
/**
* Gets the 描述字段,详细描述label。.
*
* @return the 描述字段,详细描述label。
*/
public String getTooltip() {
return tooltip;
}
/**
* Sets the 描述字段,详细描述label。.
*
* @param tooltip
* the new 描述字段,详细描述label。
*/
public void setTooltip(String tooltip) {
this.tooltip = tooltip;
}
/**
* Gets the 菜单功能键,一个标准的URI表达式。.
*
* @return the 菜单功能键,一个标准的URI表达式。
*/
public String getUri() {
return URI;
}
/**
* Sets the 菜单功能键,一个标准的URI表达式。.