接口 AnylineService.AuthorizeService

封闭接口:
AnylineService<E>

public static interface AnylineService.AuthorizeService
  • 方法详细资料

    • create

      boolean create(Role role) throws Exception
      创建角色
      参数:
      role - 角色
      返回:
      boolean
      抛出:
      Exception
    • create

      boolean create(List<Role> roles) throws Exception
      创建多个角色
      参数:
      roles - 角色列表
      返回:
      boolean
      抛出:
      Exception
    • roles

      <T extends Role> List<T> roles(Role query) throws Exception
      查询角色
      参数:
      query - 查询条件 根据metadata属性
      返回:
      List
      抛出:
      Exception
    • roles

      default <T extends Role> List<T> roles(Catalog catalog, Schema schema, String pattern) throws Exception
      查询角色
      参数:
      catalog - 对于MySQL, 则对应相应的数据库, 对于Oracle来说, 则是对应相应的数据库实例, 可以不填, 也可以直接使用Connection的实例对象中的getCatalog()方法返回的值填充;
      schema - 可以理解为数据库的登录名, 而对于Oracle也可以理解成对该数据库操作的所有者的登录名。对于Oracle要特别注意, 其登陆名必须是大写, 不然的话是无法获取到相应的数据, 而MySQL则不做强制要求。
      pattern - 角色名
      返回:
      List
      抛出:
      Exception
    • roles

      default <T extends Role> List<T> roles() throws Exception
      查询角色
      返回:
      List
      抛出:
      Exception
    • roles

      default <T extends Role> List<T> roles(User user) throws Exception
      查询角色
      返回:
      List
      抛出:
      Exception
    • rename

      boolean rename(Role origin, Role update) throws Exception
      角色重命名
      参数:
      origin - 原名
      update - 新名
      返回:
      boolean
      抛出:
      Exception
    • drop

      boolean drop(Role role) throws Exception
      删除角色
      参数:
      role - 角色
      返回:
      boolean
      抛出:
      Exception
    • create

      boolean create(User user) throws Exception
      创建用户
      参数:
      user - 用户
      返回:
      boolean
      抛出:
      Exception
    • create

      default boolean create(String name, String password) throws Exception
      创建用户
      参数:
      name - 用户名
      password - 密码
      返回:
      boolean
      抛出:
      Exception
    • users

      List<User> users(User query) throws Exception
      查询用户
      参数:
      query - 查询条件 根据metadata属性
      返回:
      List
      抛出:
      Exception
    • users

      default List<User> users(Catalog catalog, Schema schema, String pattern) throws Exception
      查询用户
      参数:
      catalog - 对于MySQL, 则对应相应的数据库, 对于Oracle来说, 则是对应相应的数据库实例, 可以不填, 也可以直接使用Connection的实例对象中的getCatalog()方法返回的值填充;
      schema - 可以理解为数据库的登录名, 而对于Oracle也可以理解成对该数据库操作的所有者的登录名。对于Oracle要特别注意, 其登陆名必须是大写, 不然的话是无法获取到相应的数据, 而MySQL则不做强制要求。
      pattern - 用户名
      返回:
      List
      抛出:
      Exception
    • users

      default List<User> users() throws Exception
      查询用户
      返回:
      List
      抛出:
      Exception
    • users

      default List<User> users(String pattern) throws Exception
      查询用户
      参数:
      pattern - 用户名
      返回:
      List
      抛出:
      Exception
    • users

      default List<User> users(Role role) throws Exception
      查询用户
      参数:
      role - 角色
      返回:
      List
      抛出:
      Exception
    • rename

      boolean rename(User origin, User update) throws Exception
      用户重命名
      参数:
      origin - 原名
      update - 新名
      返回:
      boolean
      抛出:
      Exception
    • rename

      default boolean rename(String origin, String update) throws Exception
      用户重命名
      参数:
      origin - 原名
      update - 新名
      返回:
      boolean
      抛出:
      Exception
    • drop

      boolean drop(User user) throws Exception
      删除用户
      参数:
      user - 用户
      返回:
      boolean
      抛出:
      Exception
    • drop

      default boolean drop(String user) throws Exception
      删除用户
      参数:
      user - 用户名
      返回:
      boolean
      抛出:
      Exception
    • grant

      boolean grant(User user, Privilege... privileges) throws Exception
      授权
      参数:
      user - 用户
      privileges - 权限
      返回:
      boolean
      抛出:
      Exception
    • grant

      boolean grant(User user, Role... roles) throws Exception
      授权
      参数:
      user - 用户
      roles - 角色
      返回:
      boolean
      抛出:
      Exception
    • grant

      boolean grant(Role role, Privilege... privileges) throws Exception
      授权
      参数:
      role - 角色
      privileges - 权限
      返回:
      boolean
      抛出:
      Exception
    • grant

      default boolean grant(String user, Privilege... privileges) throws Exception
      授权
      参数:
      user - 用户
      privileges - 权限
      返回:
      boolean
      抛出:
      Exception
    • revoke

      boolean revoke(User user, Privilege... privileges) throws Exception
      撤销授权
      参数:
      user - 用户
      privileges - 权限
      返回:
      boolean
      抛出:
      Exception
    • revoke

      boolean revoke(Role role, Privilege... privileges) throws Exception
      撤销授权
      参数:
      role - 角色
      privileges - 权限
      返回:
      boolean
      抛出:
      Exception
    • revoke

      boolean revoke(User user, Role... roles) throws Exception
      撤销授权
      参数:
      user - 用户
      roles - 角色
      返回:
      boolean
      抛出:
      Exception
    • revoke

      default boolean revoke(String user, Privilege... privileges) throws Exception
      撤销授权
      参数:
      user - 用户
      privileges - 权限
      返回:
      boolean
      抛出:
      Exception
    • privileges

      List<Privilege> privileges(Privilege query) throws Exception
      查询用户权限
      参数:
      query - 查询条件 根据metadata属性
      返回:
      List
      抛出:
      Exception
    • privileges

      default List<Privilege> privileges(User user) throws Exception
      查询用户权限
      参数:
      user - 用户
      返回:
      List
      抛出:
      Exception
    • privileges

      default List<Privilege> privileges(Role role) throws Exception
      查询用户权限
      参数:
      role - 角色
      返回:
      List
      抛出:
      Exception
    • privileges

      default List<Privilege> privileges(String user) throws Exception
      查询用户权限
      参数:
      user - 用户
      返回:
      List
      抛出:
      Exception