public class AuthorityControllerImpl extends BaseAuthorityController<Authority> implements DefaultAuthorityController
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_TYPE
内部默认权限实体类型
|
构造器和说明 |
---|
AuthorityControllerImpl(ControllerSession session,
java.util.Map<java.lang.Integer,AuthorityExpander> authorityExpanderMap) |
限定符和类型 | 方法和说明 |
---|---|
void |
add(Authority record)
新增记录
|
void |
clearCustomAuthorityOfExpandType(java.lang.String customId,
int expandType)
清除该自定义角色下指定类型的权限
|
void |
clearDepAuthorityOfExpandType(java.lang.String departmentId,
java.lang.String postId,
int expandType)
清除该部门职务下指定类型的权限
|
void |
clearUserAuthorityOfExpandType(java.lang.String userId,
int expandType)
清除该用户下指定类型的权限
|
java.util.List<Authority> |
find(QueryCondition queryCondition)
查找记录
|
java.util.List<Authority> |
findAuthorityTree(QueryCondition queryCondition)
查询权限实体,返回带id和pid的完整路径的树结构数据,用于模糊查找
|
java.util.List<Authority> |
findChildren(java.lang.String authorityId,
QueryCondition authorityCondition)
查找该权限的子级权限
|
protected java.util.List<java.lang.String> |
findChildrenId(java.lang.String authorityId,
QueryCondition authorityCondition)
获取指定权限实体的所有子级实体的ID列表,其他控制器可以重写该方法来提升性能
|
Authority |
findOne(QueryCondition queryCondition)
查找一条记录,找不到返回null
|
Authority |
findParent(java.lang.String authorityId)
查找该权限的父级权限
|
protected java.lang.String |
findParentId(java.lang.String authorityId)
获取父级实体的id,其他控制器可以重写该方法来提升性能
|
protected java.util.List<java.lang.String[]> |
findParentRelationIdList()
获取所有权限实体的父子间关系
|
DataList<Authority> |
findWithTotalCount(QueryCondition queryCondition)
查找记录,附带返回该查询条件下的数据总条数
|
protected int |
getAuthorityEntityType()
获取权限实体类型,内置权限实体表为0
|
Authority |
getById(java.lang.String id)
通过id获取记录
|
void |
remove(QueryCondition queryCondition)
删除记录,根据查询条件来删除
|
void |
remove(java.lang.String id)
删除记录
|
void |
removeRecursive(QueryCondition queryCondition)
递归删除记录,删除指定项以及其所有子项,相当于`rm -rf`,慎重使用!!!
|
void |
update(Authority record)
更新记录,根据记录id来更新
|
void |
updateExpandData(BaseDataRecord expandRecord,
int expandType)
更新扩展数据记录(如果有)
|
clearCustomAuthorityValue, clearCustomAuthorityValue, clearDepAuthorityValue, clearDepAuthorityValue, clearUserAuthorityValue, clearUserAuthorityValue, doesUserHaveAuthority, findAuthorityRecord, findAuthorityRecord, findByCustomRole, findByCustomRole, findByCustomRole, findByDepartment, findByDepartmentAndPost, findByDepartmentAndPost, findByRootDepartment, findByUser, findByUser, findByUser, findByUser, findRawByCustomRole, findRawByDepartmentAndPost, findRawByUser, overwriteAuthorityRecord, setCustomAuthorityValue, setCustomAuthorityValue, setDepAuthorityValue, setDepAuthorityValue, setDepAuthorityValue, setUserAuthorityValue, setUserAuthorityValue
addDepRole, findDepRoleByUser, getSession, removeDepRole
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearCustomAuthorityValue, clearCustomAuthorityValue, clearDepAuthorityValue, clearDepAuthorityValue, clearUserAuthorityValue, clearUserAuthorityValue, doesUserHaveAuthority, findAuthorityRecord, findAuthorityRecord, findByCustomRole, findByCustomRole, findByCustomRole, findByDepartment, findByDepartmentAndPost, findByDepartmentAndPost, findByRootDepartment, findByUser, findByUser, findByUser, findByUser, findRawByCustomRole, findRawByDepartmentAndPost, findRawByUser, overwriteAuthorityRecord, setCustomAuthorityValue, setCustomAuthorityValue, setDepAuthorityValue, setDepAuthorityValue, setDepAuthorityValue, setUserAuthorityValue, setUserAuthorityValue
public static final int DEFAULT_TYPE
public AuthorityControllerImpl(ControllerSession session, java.util.Map<java.lang.Integer,AuthorityExpander> authorityExpanderMap)
protected int getAuthorityEntityType()
BaseAuthorityController
getAuthorityEntityType
在类中 BaseAuthorityController<Authority>
public java.util.List<Authority> findChildren(java.lang.String authorityId, QueryCondition authorityCondition) throws java.lang.Exception
AuthorityController
findChildren
在接口中 AuthorityController<Authority>
findChildren
在类中 BaseAuthorityController<Authority>
authorityId
- 权限IDauthorityCondition
- 权限查询条件java.lang.Exception
protected java.util.List<java.lang.String> findChildrenId(java.lang.String authorityId, QueryCondition authorityCondition) throws java.lang.Exception
BaseAuthorityController
findChildrenId
在类中 BaseAuthorityController<Authority>
authorityId
- 权限实体IDauthorityCondition
- 条件java.lang.Exception
protected java.util.List<java.lang.String[]> findParentRelationIdList() throws java.lang.Exception
BaseAuthorityController
findParentRelationIdList
在类中 BaseAuthorityController<Authority>
java.lang.Exception
protected java.lang.String findParentId(java.lang.String authorityId) throws java.lang.Exception
BaseAuthorityController
findParentId
在类中 BaseAuthorityController<Authority>
java.lang.Exception
public Authority findParent(java.lang.String authorityId) throws java.lang.Exception
AuthorityController
findParent
在接口中 AuthorityController<Authority>
findParent
在类中 BaseAuthorityController<Authority>
authorityId
- 权限IDjava.lang.Exception
public void add(Authority record) throws java.lang.Exception
DataOperator
add
在接口中 DataOperator<Authority>
record
- 记录对象java.lang.Exception
public Authority getById(java.lang.String id) throws java.lang.Exception
DataOperator
getById
在接口中 DataOperator<Authority>
id
- 记录idjava.lang.Exception
public void update(Authority record) throws java.lang.Exception
DataOperator
update
在接口中 DataOperator<Authority>
record
- 记录对象java.lang.Exception
public void remove(java.lang.String id) throws java.lang.Exception
DataOperator
remove
在接口中 DataOperator<Authority>
id
- 记录idjava.lang.Exception
public void remove(QueryCondition queryCondition) throws java.lang.Exception
DataOperator
remove
在接口中 DataOperator<Authority>
queryCondition
- 查询条件java.lang.Exception
public void removeRecursive(QueryCondition queryCondition) throws java.lang.Exception
AuthorityController
removeRecursive
在接口中 AuthorityController<Authority>
removeRecursive
在类中 BaseAuthorityController<Authority>
queryCondition
- 查询条件java.lang.Exception
public java.util.List<Authority> find(QueryCondition queryCondition) throws java.lang.Exception
DataOperator
find
在接口中 DataOperator<Authority>
queryCondition
- 查询条件java.lang.Exception
public Authority findOne(QueryCondition queryCondition) throws java.lang.Exception
DataOperator
findOne
在接口中 DataOperator<Authority>
queryCondition
- 查询条件java.lang.Exception
public DataList<Authority> findWithTotalCount(QueryCondition queryCondition) throws java.lang.Exception
DataOperator
findWithTotalCount
在接口中 DataOperator<Authority>
queryCondition
- 查询条件java.lang.Exception
public java.util.List<Authority> findAuthorityTree(QueryCondition queryCondition) throws java.lang.Exception
AuthorityController
findAuthorityTree
在接口中 AuthorityController<Authority>
findAuthorityTree
在类中 BaseAuthorityController<Authority>
queryCondition
- 查询条件java.lang.Exception
public void updateExpandData(BaseDataRecord expandRecord, int expandType) throws java.lang.Exception
AuthorityController
updateExpandData
在接口中 AuthorityController<Authority>
updateExpandData
在类中 BaseAuthorityController<Authority>
expandRecord
- 扩展记录expandType
- 扩展类型java.lang.Exception
public void clearUserAuthorityOfExpandType(java.lang.String userId, int expandType) throws java.lang.Exception
DefaultAuthorityController
clearUserAuthorityOfExpandType
在接口中 DefaultAuthorityController
userId
- 用户idexpandType
- 扩展类型java.lang.Exception
public void clearCustomAuthorityOfExpandType(java.lang.String customId, int expandType) throws java.lang.Exception
DefaultAuthorityController
clearCustomAuthorityOfExpandType
在接口中 DefaultAuthorityController
customId
- 部门idexpandType
- 扩展类型java.lang.Exception
public void clearDepAuthorityOfExpandType(java.lang.String departmentId, java.lang.String postId, int expandType) throws java.lang.Exception
DefaultAuthorityController
clearDepAuthorityOfExpandType
在接口中 DefaultAuthorityController
departmentId
- 部门idpostId
- 职务idexpandType
- 扩展类型java.lang.Exception