Interface UserService

All Superinterfaces:
PersistedService
All Known Subinterfaces:
UserManagementService
All Known Implementing Classes:
UserManagementServiceImpl, UserServiceImpl

public interface UserService extends PersistedService
  • Method Details

    • load

      @Nullable User load(String username)
    • loadAllByName

      List<User> loadAllByName(String username)
    • loadById

      @Nullable User loadById(String id)
    • loadByIds

      List<User> loadByIds(Collection<String> ids)
    • loadByAuthServiceUidOrUsername

      Optional<User> loadByAuthServiceUidOrUsername(String authServiceUid, String username)
      Tries to find a user for the given authentication service UID or username. (in that order)
      Parameters:
      authServiceUid - the authentication service UID (tried first)
      username - the username (tried second)
      Returns:
      the user or an empty option if no user can be found
    • delete

      int delete(String username)
    • deleteById

      int deleteById(String userId)
    • create

      User create()
    • loadAll

      List<User> loadAll()
    • getAdminUser

      @Deprecated User getAdminUser()
      Deprecated.
      If you really need the root user, use getRootUser() instead.
    • getRootUser

      Optional<User> getRootUser()
      Get the root user. The root user might not be present in all environments and there shouldn't really be a need to explicitly refer to the root user. But if you really need it, here you go.
      Returns:
      The root user, if present. An empty optional otherwise.
    • count

      long count()
    • loadAllForAuthServiceBackend

      List<User> loadAllForAuthServiceBackend(String authServiceBackendId)
    • loadAllForRole

      Collection<User> loadAllForRole(Role role)
    • getRoleNames

      Set<String> getRoleNames(User user)
    • getPermissionsForUser

      List<org.apache.shiro.authz.Permission> getPermissionsForUser(User user)
    • getWildcardPermissionsForUser

      List<org.apache.shiro.authz.permission.WildcardPermission> getWildcardPermissionsForUser(User user)
    • getGRNPermissionsForUser

      List<GRNPermission> getGRNPermissionsForUser(User user)
    • getUserPermissionsFromRoles

      Set<String> getUserPermissionsFromRoles(User user)
    • dissociateAllUsersFromRole

      void dissociateAllUsersFromRole(Role role)