Interface RoleManager

All Known Implementing Classes:
ConditionalRoleManager, DefaultRoleManager, DomainManager, GroupRoleManager

public interface RoleManager
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addLink(String name1, String name2, String... domain)
    addLink adds the inheritance link between two roles.
    void
    Clear clears all stored data and resets the role manager to the initial state.
    void
    deleteLink(String name1, String name2, String... domain)
    deleteLink deletes the inheritance link between two roles.
    getRoles(String name, String... domain)
    getRoles gets the roles that a user inherits.
    getUsers(String name, String... domain)
    getUsers gets the users that inherits a role.
    boolean
    hasLink(String name1, String name2, String... domain)
    hasLink determines whether a link exists between two roles.
    void
    printRoles prints all the roles to log.
  • Method Details

    • clear

      void clear()
      Clear clears all stored data and resets the role manager to the initial state.
    • addLink

      void addLink(String name1, String name2, String... domain)
      addLink adds the inheritance link between two roles. role: name1 and role: name2. domain is a prefix to the roles.
      Parameters:
      name1 - the first role (or user).
      name2 - the second role.
      domain - the domain the roles belong to.
    • deleteLink

      void deleteLink(String name1, String name2, String... domain)
      deleteLink deletes the inheritance link between two roles. role: name1 and role: name2. domain is a prefix to the roles.
      Parameters:
      name1 - the first role (or user).
      name2 - the second role.
      domain - the domain the roles belong to.
    • hasLink

      boolean hasLink(String name1, String name2, String... domain)
      hasLink determines whether a link exists between two roles. role: name1 inherits role: name2. domain is a prefix to the roles.
      Parameters:
      name1 - the first role (or a user).
      name2 - the second role.
      domain - the domain the roles belong to.
      Returns:
      whether name1 inherits name2 (name1 has role name2).
    • getRoles

      List<String> getRoles(String name, String... domain)
      getRoles gets the roles that a user inherits. domain is a prefix to the roles.
      Parameters:
      name - the user (or a role).
      domain - the domain the roles belong to.
      Returns:
      the roles.
    • getUsers

      List<String> getUsers(String name, String... domain)
      getUsers gets the users that inherits a role.
      Parameters:
      name - the role.
      domain - is a prefix to the users (can be used for other purposes).
      Returns:
      the users.
    • printRoles

      void printRoles()
      printRoles prints all the roles to log.