public class AuthorityContext
extends java.lang.Object
权限模块的入口,该类使用单例模式
public static AuthorityContext getInstance()
init(ContextOption)
初始化public static void reset()
public static void registerExpandRecordController(AuthorityExpanderProvider provider) throws java.lang.Exception
provider
- 权限实体扩展属性操作器提供者java.lang.Exception
public static void unregisterExpandRecordController(AuthorityExpanderProvider provider) throws java.lang.Exception
provider
- 权限实体扩展属性操作器提供者java.lang.Exception
public static void registerExternalAuthorityController(AuthorityOperatorProvider provider) throws java.lang.Exception
provider
- 权限控制器提供者java.lang.Exception
public static void registerAuthorityType(AuthorityType authorityType) throws java.lang.Exception
authorityType
- 权限类型对象java.lang.Exception
public AuthorityContext init(ContextOption option) throws java.lang.Exception
option
- 初始化参数类java.lang.Exception
public AuthorityContext init(ContextOption option, AuthorityInitialDataChecker checker) throws java.lang.Exception
option
- 初始化参数类checker
- 初始数据检查器java.lang.Exception
public AuthorityContext init(ContextOption option, AuthorityInitialDataChecker checker, AuthorityInnerDataOperator dataOperator) throws java.lang.Exception
option
- 初始化参数类checker
- 初始数据检查器dataOperator
- 注册内部数据操作器java.lang.Exception
public UserController getUserController()
public DepartmentController getDepartmentController()
public PostController getPostController()
public CustomRoleController getCustomRoleController()
public DefaultAuthorityController getAuthorityController()
public <T> T getAuthorityController(java.lang.Class<T> controllerInterface) throws java.lang.Exception
java.lang.Exception
public <T extends BaseAuthority> AuthorityController<T> getExternalAuthorityController(java.lang.Class<T> cls) throws java.lang.Exception
getAuthorityController(Class)
代替cls
- 权限数据记录的类对象java.lang.Exception
- 根据cls找不到对应的AuthorityController则抛出此异常public void doPersonnelWork(PersonnelWork work) throws java.lang.Exception
work
- 人员管理操作器java.lang.Exception
public <T> T unWrap(java.lang.Class<T> cls)
public void dispatchAfterInitEvent(AfterInitEvent event)