public interface AuthorityController<T extends BaseAuthority> extends BaseController<T>
权限实体控制器接口
限定符和类型 | 方法和说明 |
---|---|
void |
clearCustomAuthorityValue(java.lang.String customRoleId)
清空对指定自定义角色的权限值
|
void |
clearCustomAuthorityValue(java.lang.String customRoleId,
java.lang.String authorityId,
AuthorityType type)
取消对自定义角色设置指定权限值
|
void |
clearDepAuthorityValue(java.lang.String departmentId,
java.lang.String postId)
清空对指定部门职务设置的权限值
|
void |
clearDepAuthorityValue(java.lang.String departmentId,
java.lang.String postId,
java.lang.String authorityId,
AuthorityType type)
取消对部门职务设置指定权限值
|
void |
clearUserAuthorityValue(java.lang.String userId)
清空对指定用户设置的权限值
|
void |
clearUserAuthorityValue(java.lang.String userId,
java.lang.String authorityId,
AuthorityType type)
取消对用户设置指定权限值(使其使用继承的权限)
|
boolean |
doesUserHaveAuthority(java.lang.String userId,
java.lang.String authorityId,
AuthorityType type)
查询用户是否具有指定权限,权限来自用户权限/自定义角色权限/部门职务权限/继承的部门职务权限
|
java.util.Map<java.lang.String,java.util.List<AuthorityRecord>> |
findAuthorityRecord(java.util.List<java.lang.String> authorityIdList)
查询对应权限实体的所有关联的权限记录
|
java.util.List<AuthorityRecord> |
findAuthorityRecord(java.lang.String authorityId)
查询对应权限实体的所有关联的权限记录
|
java.util.List<T> |
findAuthorityTree(QueryCondition queryCondition)
查询权限实体,返回带id和pid的完整路径的树结构数据,用于模糊查找
|
java.util.List<T> |
findByCustomRole(java.lang.String customRoleId,
AuthorityQueryType queryType,
AuthorityType authorityType,
boolean withAuthorityDetail,
QueryCondition authorityCondition)
查找指定自定义角色下的权限
|
java.util.List<T> |
findByCustomRole(java.lang.String customRoleId,
AuthorityQueryType queryType,
AuthorityType authorityType,
QueryCondition authorityCondition)
查找指定自定义角色下的权限
|
java.util.List<T> |
findByCustomRole(java.lang.String customRoleId,
AuthorityQueryType queryType,
QueryCondition authorityCondition)
查找指定自定义角色下的权限
|
java.util.List<T> |
findByDepartment(java.lang.String departmentId,
AuthorityQueryType queryType,
QueryCondition authorityCondition)
查找指定部门下的权限
|
java.util.List<T> |
findByDepartmentAndPost(java.lang.String departmentId,
java.lang.String postId,
AuthorityQueryType queryType,
AuthorityType authorityType,
QueryCondition authorityCondition)
查找指定部门职务下的权限
|
java.util.List<T> |
findByDepartmentAndPost(java.lang.String departmentId,
java.lang.String postId,
AuthorityQueryType queryType,
QueryCondition authorityCondition)
查找指定部门职务下的权限
|
java.util.List<T> |
findByRootDepartment(AuthorityQueryType queryType,
QueryCondition authorityCondition)
查找根部门下的权限
|
java.util.List<T> |
findByUser(java.lang.String userId,
AuthorityQueryType queryType,
AuthorityType authorityType,
boolean withAuthorityDetail,
boolean withParentNode,
QueryCondition authorityCondition)
查找指定用户下的权限
|
java.util.List<T> |
findByUser(java.lang.String userId,
AuthorityQueryType queryType,
AuthorityType authorityType,
boolean withAuthorityDetail,
QueryCondition authorityCondition)
查找指定用户下的权限
|
java.util.List<T> |
findByUser(java.lang.String userId,
AuthorityQueryType queryType,
AuthorityType authorityType,
QueryCondition authorityCondition)
查找指定用户下的权限
|
java.util.List<T> |
findByUser(java.lang.String userId,
AuthorityQueryType queryType,
QueryCondition authorityCondition)
查找指定用户下的权限
|
java.util.List<T> |
findChildren(java.lang.String authorityId,
QueryCondition authorityCondition)
查找该权限的子级权限
|
T |
findParent(java.lang.String authorityId)
查找该权限的父级权限
|
java.util.List<T> |
findRawByCustomRole(java.lang.String customRoleId,
QueryCondition authorityCondition)
查找指定自定义角色下的权限,忽略权限实体的权限继承关系
|
java.util.List<T> |
findRawByDepartmentAndPost(java.lang.String departmentId,
java.lang.String postId,
QueryCondition authorityCondition)
查找指定部门职务下的权限,忽略部门权限继承关系和权限实体的权限继承关系
|
java.util.List<T> |
findRawByUser(java.lang.String userId,
QueryCondition authorityCondition)
查找指定用户下的权限,忽略权限实体的权限继承关系
|
void |
overwriteAuthorityRecord(java.lang.String authorityId,
java.util.List<AuthorityRecord> authorityRecords)
覆盖权限实体的权限记录(会清除当前该权限实体的所有权限记录,然后插入新的)
|
void |
removeRecursive(QueryCondition queryCondition)
递归删除记录,删除指定项以及其所有子项,相当于`rm -rf`,慎重使用!!!
|
void |
setCustomAuthorityValue(java.lang.String customRoleId,
AuthorityValue value,
java.lang.String authorityId,
AuthorityType type)
对自定义角色设置指定权限值,清除子级权限实体的权限值
|
void |
setCustomAuthorityValue(java.lang.String customRoleId,
AuthorityValue value,
java.lang.String authorityId,
AuthorityType type,
boolean clearChildrenAuthority)
对自定义角色设置指定权限值
|
void |
setDepAuthorityValue(java.lang.String departmentId,
java.lang.String postId,
AuthorityValue value,
java.lang.String authorityId,
AuthorityType type)
对部门职务设置指定权限值,清除子级权限实体的权限值
|
void |
setDepAuthorityValue(java.lang.String departmentId,
java.lang.String postId,
AuthorityValue value,
java.lang.String authorityId,
AuthorityType type,
boolean clearChildrenAuthority)
对部门职务设置指定权限值
|
void |
setDepAuthorityValue(java.lang.String departmentId,
java.lang.String postId,
AuthorityValue value,
java.lang.String authorityId,
AuthorityType type,
boolean clearChildrenAuthority,
boolean clearChildrenDep)
对部门职务设置指定权限值
|
void |
setUserAuthorityValue(java.lang.String userId,
AuthorityValue value,
java.lang.String authorityId,
AuthorityType type)
对用户设置指定权限值,清除子级权限实体的权限值
|
void |
setUserAuthorityValue(java.lang.String userId,
AuthorityValue value,
java.lang.String authorityId,
AuthorityType type,
boolean clearChildrenAuthority)
对用户设置指定权限值
|
void |
updateExpandData(BaseDataRecord expandRecord,
int expandType)
更新扩展数据记录(如果有)
|
add, find, findOne, findWithTotalCount, getById, remove, remove, update
java.util.List<T> findAuthorityTree(QueryCondition queryCondition) throws java.lang.Exception
queryCondition
- 查询条件java.lang.Exception
java.util.List<T> findByUser(java.lang.String userId, AuthorityQueryType queryType, QueryCondition authorityCondition) throws java.lang.Exception
userId
- 用户IDqueryType
- 权限查询类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByUser(java.lang.String userId, AuthorityQueryType queryType, AuthorityType authorityType, QueryCondition authorityCondition) throws java.lang.Exception
userId
- 用户IDqueryType
- 权限查询类型authorityType
- 权限类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByUser(java.lang.String userId, AuthorityQueryType queryType, AuthorityType authorityType, boolean withAuthorityDetail, QueryCondition authorityCondition) throws java.lang.Exception
userId
- 用户IDqueryType
- 权限查询类型authorityType
- 权限类型withAuthorityDetail
- 同时查出权限细节authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByUser(java.lang.String userId, AuthorityQueryType queryType, AuthorityType authorityType, boolean withAuthorityDetail, boolean withParentNode, QueryCondition authorityCondition) throws java.lang.Exception
userId
- 用户IDqueryType
- 权限查询类型authorityType
- 权限类型withAuthorityDetail
- 同时查出权限细节withParentNode
- 同时查出所有父节点authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findRawByUser(java.lang.String userId, QueryCondition authorityCondition) throws java.lang.Exception
userId
- 用户IDauthorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByCustomRole(java.lang.String customRoleId, AuthorityQueryType queryType, QueryCondition authorityCondition) throws java.lang.Exception
customRoleId
- 自定义角色IDqueryType
- 权限查询类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByCustomRole(java.lang.String customRoleId, AuthorityQueryType queryType, AuthorityType authorityType, QueryCondition authorityCondition) throws java.lang.Exception
customRoleId
- 自定义角色IDqueryType
- 权限查询类型authorityType
- 权限类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByCustomRole(java.lang.String customRoleId, AuthorityQueryType queryType, AuthorityType authorityType, boolean withAuthorityDetail, QueryCondition authorityCondition) throws java.lang.Exception
customRoleId
- 自定义角色IDqueryType
- 权限查询类型authorityType
- 权限类型withAuthorityDetail
- 同时查出权限细节authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findRawByCustomRole(java.lang.String customRoleId, QueryCondition authorityCondition) throws java.lang.Exception
customRoleId
- 自定义角色IDauthorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByDepartmentAndPost(java.lang.String departmentId, java.lang.String postId, AuthorityQueryType queryType, QueryCondition authorityCondition) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDqueryType
- 权限查询类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByDepartmentAndPost(java.lang.String departmentId, java.lang.String postId, AuthorityQueryType queryType, AuthorityType authorityType, QueryCondition authorityCondition) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDqueryType
- 权限查询类型authorityType
- 权限类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findRawByDepartmentAndPost(java.lang.String departmentId, java.lang.String postId, QueryCondition authorityCondition) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDauthorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByDepartment(java.lang.String departmentId, AuthorityQueryType queryType, QueryCondition authorityCondition) throws java.lang.Exception
departmentId
- 部门IDqueryType
- 权限查询类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findByRootDepartment(AuthorityQueryType queryType, QueryCondition authorityCondition) throws java.lang.Exception
queryType
- 权限查询类型authorityCondition
- 权限查询条件java.lang.Exception
java.util.List<T> findChildren(java.lang.String authorityId, QueryCondition authorityCondition) throws java.lang.Exception
authorityId
- 权限IDauthorityCondition
- 权限查询条件java.lang.Exception
T findParent(java.lang.String authorityId) throws java.lang.Exception
authorityId
- 权限IDjava.lang.Exception
void updateExpandData(BaseDataRecord expandRecord, int expandType) throws java.lang.Exception
expandRecord
- 扩展记录expandType
- 扩展类型java.lang.Exception
void setUserAuthorityValue(java.lang.String userId, AuthorityValue value, java.lang.String authorityId, AuthorityType type) throws java.lang.Exception
userId
- 用户IDvalue
- 权限值authorityId
- 权限实体IDtype
- 权限类型java.lang.Exception
void setUserAuthorityValue(java.lang.String userId, AuthorityValue value, java.lang.String authorityId, AuthorityType type, boolean clearChildrenAuthority) throws java.lang.Exception
userId
- 用户IDvalue
- 权限值authorityId
- 权限实体IDtype
- 权限类型clearChildrenAuthority
- 是否清除子级权限实体的权限值java.lang.Exception
void clearUserAuthorityValue(java.lang.String userId) throws java.lang.Exception
userId
- 用户IDjava.lang.Exception
void clearUserAuthorityValue(java.lang.String userId, java.lang.String authorityId, AuthorityType type) throws java.lang.Exception
userId
- 用户IDauthorityId
- 权限实体IDtype
- 权限类型java.lang.Exception
void setCustomAuthorityValue(java.lang.String customRoleId, AuthorityValue value, java.lang.String authorityId, AuthorityType type) throws java.lang.Exception
customRoleId
- 自定义角色IDvalue
- 权限值authorityId
- 权限实体IDtype
- 权限类型java.lang.Exception
void setCustomAuthorityValue(java.lang.String customRoleId, AuthorityValue value, java.lang.String authorityId, AuthorityType type, boolean clearChildrenAuthority) throws java.lang.Exception
customRoleId
- 自定义角色IDvalue
- 权限值authorityId
- 权限实体IDtype
- 权限类型clearChildrenAuthority
- 是否清除子级权限实体的权限值java.lang.Exception
void clearCustomAuthorityValue(java.lang.String customRoleId) throws java.lang.Exception
customRoleId
- 自定义角色IDjava.lang.Exception
void clearCustomAuthorityValue(java.lang.String customRoleId, java.lang.String authorityId, AuthorityType type) throws java.lang.Exception
customRoleId
- 自定义角色IDauthorityId
- 权限实体IDtype
- 权限类型java.lang.Exception
void setDepAuthorityValue(java.lang.String departmentId, java.lang.String postId, AuthorityValue value, java.lang.String authorityId, AuthorityType type) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDvalue
- 权限值authorityId
- 权限实体IDtype
- 权限类型java.lang.Exception
void setDepAuthorityValue(java.lang.String departmentId, java.lang.String postId, AuthorityValue value, java.lang.String authorityId, AuthorityType type, boolean clearChildrenAuthority) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDvalue
- 权限值authorityId
- 权限实体IDtype
- 权限类型clearChildrenAuthority
- 是否清除子级权限实体的权限值java.lang.Exception
void setDepAuthorityValue(java.lang.String departmentId, java.lang.String postId, AuthorityValue value, java.lang.String authorityId, AuthorityType type, boolean clearChildrenAuthority, boolean clearChildrenDep) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDvalue
- 权限值authorityId
- 权限实体IDtype
- 权限类型clearChildrenAuthority
- 是否清除子级权限实体的权限值clearChildrenDep
- 是否清除子级部门的权限值java.lang.Exception
void clearDepAuthorityValue(java.lang.String departmentId, java.lang.String postId) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDjava.lang.Exception
void clearDepAuthorityValue(java.lang.String departmentId, java.lang.String postId, java.lang.String authorityId, AuthorityType type) throws java.lang.Exception
departmentId
- 部门IDpostId
- 职务IDauthorityId
- 权限实体IDtype
- 权限类型java.lang.Exception
boolean doesUserHaveAuthority(java.lang.String userId, java.lang.String authorityId, AuthorityType type) throws java.lang.Exception
userId
- 用户IDauthorityId
- 权限实体IDtype
- 权限类型java.lang.Exception
void removeRecursive(QueryCondition queryCondition) throws java.lang.Exception
queryCondition
- 查询条件java.lang.Exception
java.util.Map<java.lang.String,java.util.List<AuthorityRecord>> findAuthorityRecord(java.util.List<java.lang.String> authorityIdList) throws java.lang.Exception
authorityIdList
- 权限实体ID的列表java.lang.Exception
java.util.List<AuthorityRecord> findAuthorityRecord(java.lang.String authorityId) throws java.lang.Exception
authorityId
- 权限实体IDjava.lang.Exception
void overwriteAuthorityRecord(java.lang.String authorityId, java.util.List<AuthorityRecord> authorityRecords) throws java.lang.Exception
authorityId
- 权限实体IDauthorityRecords
- 权限实体对应的权限记录java.lang.Exception