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, setUserAuthorityValueaddDepRole, findDepRoleByUser, getSession, removeDepRoleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearCustomAuthorityValue, 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, setUserAuthorityValuepublic static final int DEFAULT_TYPE
public AuthorityControllerImpl(ControllerSession session, java.util.Map<java.lang.Integer,AuthorityExpander> authorityExpanderMap)
protected int getAuthorityEntityType()
BaseAuthorityControllergetAuthorityEntityType 在类中 BaseAuthorityController<Authority>public java.util.List<Authority> findChildren(java.lang.String authorityId, QueryCondition authorityCondition) throws java.lang.Exception
AuthorityControllerfindChildren 在接口中 AuthorityController<Authority>findChildren 在类中 BaseAuthorityController<Authority>authorityId - 权限IDauthorityCondition - 权限查询条件java.lang.Exceptionprotected java.util.List<java.lang.String> findChildrenId(java.lang.String authorityId,
QueryCondition authorityCondition)
throws java.lang.Exception
BaseAuthorityControllerfindChildrenId 在类中 BaseAuthorityController<Authority>authorityId - 权限实体IDauthorityCondition - 条件java.lang.Exceptionprotected java.util.List<java.lang.String[]> findParentRelationIdList()
throws java.lang.Exception
BaseAuthorityControllerfindParentRelationIdList 在类中 BaseAuthorityController<Authority>java.lang.Exceptionprotected java.lang.String findParentId(java.lang.String authorityId)
throws java.lang.Exception
BaseAuthorityControllerfindParentId 在类中 BaseAuthorityController<Authority>java.lang.Exceptionpublic Authority findParent(java.lang.String authorityId) throws java.lang.Exception
AuthorityControllerfindParent 在接口中 AuthorityController<Authority>findParent 在类中 BaseAuthorityController<Authority>authorityId - 权限IDjava.lang.Exceptionpublic void add(Authority record) throws java.lang.Exception
DataOperatoradd 在接口中 DataOperator<Authority>record - 记录对象java.lang.Exceptionpublic Authority getById(java.lang.String id) throws java.lang.Exception
DataOperatorgetById 在接口中 DataOperator<Authority>id - 记录idjava.lang.Exceptionpublic void update(Authority record) throws java.lang.Exception
DataOperatorupdate 在接口中 DataOperator<Authority>record - 记录对象java.lang.Exceptionpublic void remove(java.lang.String id)
throws java.lang.Exception
DataOperatorremove 在接口中 DataOperator<Authority>id - 记录idjava.lang.Exceptionpublic void remove(QueryCondition queryCondition) throws java.lang.Exception
DataOperatorremove 在接口中 DataOperator<Authority>queryCondition - 查询条件java.lang.Exceptionpublic void removeRecursive(QueryCondition queryCondition) throws java.lang.Exception
AuthorityControllerremoveRecursive 在接口中 AuthorityController<Authority>removeRecursive 在类中 BaseAuthorityController<Authority>queryCondition - 查询条件java.lang.Exceptionpublic java.util.List<Authority> find(QueryCondition queryCondition) throws java.lang.Exception
DataOperatorfind 在接口中 DataOperator<Authority>queryCondition - 查询条件java.lang.Exceptionpublic Authority findOne(QueryCondition queryCondition) throws java.lang.Exception
DataOperatorfindOne 在接口中 DataOperator<Authority>queryCondition - 查询条件java.lang.Exceptionpublic DataList<Authority> findWithTotalCount(QueryCondition queryCondition) throws java.lang.Exception
DataOperatorfindWithTotalCount 在接口中 DataOperator<Authority>queryCondition - 查询条件java.lang.Exceptionpublic java.util.List<Authority> findAuthorityTree(QueryCondition queryCondition) throws java.lang.Exception
AuthorityControllerfindAuthorityTree 在接口中 AuthorityController<Authority>findAuthorityTree 在类中 BaseAuthorityController<Authority>queryCondition - 查询条件java.lang.Exceptionpublic void updateExpandData(BaseDataRecord expandRecord, int expandType) throws java.lang.Exception
AuthorityControllerupdateExpandData 在接口中 AuthorityController<Authority>updateExpandData 在类中 BaseAuthorityController<Authority>expandRecord - 扩展记录expandType - 扩展类型java.lang.Exceptionpublic void clearUserAuthorityOfExpandType(java.lang.String userId,
int expandType)
throws java.lang.Exception
DefaultAuthorityControllerclearUserAuthorityOfExpandType 在接口中 DefaultAuthorityControlleruserId - 用户idexpandType - 扩展类型java.lang.Exceptionpublic void clearCustomAuthorityOfExpandType(java.lang.String customId,
int expandType)
throws java.lang.Exception
DefaultAuthorityControllerclearCustomAuthorityOfExpandType 在接口中 DefaultAuthorityControllercustomId - 部门idexpandType - 扩展类型java.lang.Exceptionpublic void clearDepAuthorityOfExpandType(java.lang.String departmentId,
java.lang.String postId,
int expandType)
throws java.lang.Exception
DefaultAuthorityControllerclearDepAuthorityOfExpandType 在接口中 DefaultAuthorityControllerdepartmentId - 部门idpostId - 职务idexpandType - 扩展类型java.lang.Exception