com.github.dactiv.showcase.entity.account
类 Resource

java.lang.Object
  继承者 com.github.dactiv.showcase.entity.IdEntity
      继承者 com.github.dactiv.showcase.entity.account.Resource
所有已实现的接口:
Serializable

@Entity
public class Resource
extends IdEntity

安全资源(包括菜单)实体

作者:
maurice
另请参见:
序列化表格

字段摘要
static String UserResources
          通过用户id和资源类型获取该用户下的所有资源
 
从类 com.github.dactiv.showcase.entity.IdEntity 继承的字段
id
 
构造方法摘要
Resource()
          构造方法
 
方法摘要
 List<Resource> getChildren()
          获取子类资源
 List<Group> getGroupsList()
          获取该资源对应的组集合
 String getIcon()
          获取资源图标
 Boolean getLeaf()
          获取当前资源是否包含叶子节点,如果是返回ture,否则返回false
 String getName()
          获取资源名称
 Resource getParent()
          获取父类资源
 String getParentId()
          获取父类ID
 String getParentName()
          获取父类名称
 String getPermission()
          获取permission字符串
 String getRemark()
          获取备注
 Long getSort()
          获取顺序值
 String getType()
          获取资源类型
 String getTypeName()
          获取资源类型的名称
 String getValue()
          获取资源操作URL
 void setChildren(List<Resource> children)
          设置子类资源
 void setGroupsList(List<Group> groupsList)
          设置该资源对应的组集合
 void setIcon(String icon)
          设置资源图标
 void setLeaf(Boolean leaf)
          设置当前资源是否包含叶子节点,
 void setName(String name)
          设置资源名称
 void setParent(Resource parent)
          设置父类资源
 void setPermission(String permission)
          设置permission字符串
 void setRemark(String remark)
          设置备注
 void setSort(Long sort)
          设置顺序值
 void setType(String type)
          设置资源类型
 void setValue(String value)
          设置资源操作URL
 
从类 com.github.dactiv.showcase.entity.IdEntity 继承的方法
getId, setId
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

UserResources

public static final String UserResources
通过用户id和资源类型获取该用户下的所有资源

另请参见:
常量字段值
构造方法详细信息

Resource

public Resource()
构造方法

方法详细信息

getName

@NotEmpty
@Length(max=32)
public String getName()
获取资源名称

返回:
String

setName

public void setName(String name)
设置资源名称

参数:
name - 资源名称

getValue

@Length(max=256)
public String getValue()
获取资源操作URL

返回:
String

setValue

public void setValue(String value)
设置资源操作URL

参数:
value - 资源操作URL

getParent

public Resource getParent()
获取父类资源

返回:
Resource

setParent

public void setParent(Resource parent)
设置父类资源

参数:
parent - 父类资源

getSort

@Min(value=0L)
@NotNull
public Long getSort()
获取顺序值

返回:
Integer

setSort

public void setSort(Long sort)
设置顺序值

参数:
sort - 顺序值

getLeaf

public Boolean getLeaf()
获取当前资源是否包含叶子节点,如果是返回ture,否则返回false

返回:
Boolean

setLeaf

public void setLeaf(Boolean leaf)
设置当前资源是否包含叶子节点,


getChildren

public List<Resource> getChildren()
获取子类资源

返回:
List

setChildren

public void setChildren(List<Resource> children)
设置子类资源

参数:
children - 子类资源

getRemark

@Length(max=512)
public String getRemark()
获取备注

返回:
String

setRemark

public void setRemark(String remark)
设置备注

参数:
remark - 备注

getType

@NotEmpty
@Length(min=2,
        max=2)
public String getType()
获取资源类型

返回:
String

setType

public void setType(String type)
设置资源类型

参数:
type - 类型
另请参见:
ResourceType

getGroupsList

public List<Group> getGroupsList()
获取该资源对应的组集合

返回:
List

setGroupsList

public void setGroupsList(List<Group> groupsList)
设置该资源对应的组集合

参数:
groupsList - 组集合

getParentName

public String getParentName()
获取父类名称

返回:
String

getParentId

public String getParentId()
获取父类ID

返回:
String

getPermission

@Length(max=64)
public String getPermission()
获取permission字符串

返回:
String

setPermission

public void setPermission(String permission)
设置permission字符串

参数:
permission - 字符串

getIcon

@Length(max=32)
public String getIcon()
获取资源图标

返回:
String

setIcon

public void setIcon(String icon)
设置资源图标

参数:
icon - 图标css class

getTypeName

public String getTypeName()
获取资源类型的名称

返回:
String


Copyright © 2014. All rights reserved.