Interface UserDAO

All Superinterfaces:
AnyDAO<User>, DAO<User>
All Known Subinterfaces:
UserRepo, UserRepo

public interface UserDAO extends AnyDAO<User>
  • Method Details

    • findKey

      Optional<String> findKey(String username)
    • findUsername

      Optional<String> findUsername(String key)
    • securityChecks

      void securityChecks(Set<String> authRealms, String key, String realm, Collection<String> groups)
      Checks if the calling user is authorized to access the User matching the provided key, under the given realm.
      Parameters:
      authRealms - realms for which the calling user owns entitlement(s) to check
      key - User key
      realm - User's realm full path
      groups - group the User is member of
    • isManager

      boolean isManager(String key)
    • findManagedUsers

      List<User> findManagedUsers(String key)
      Returns all users managed by the user for the given key. Given: * user U1 for the provided key, member of group G1 * user U2, member of group G2 then we have 4 cases where U2 is managed by U1: (a) U2 has uManager set to U1 (b) G2 has uManager set to U1 (c) U2 has gManager set to G1 (d) G2 has gManager set to G1
      Parameters:
      key - manager key
      Returns:
      users managed by the user for the given key
    • findManagedGroups

      List<Group> findManagedGroups(String key)
      Returns all groups managed by the user for the given key. Given: * user U1 for the provided key, member of group G1 * group G2 then we have 2 cases where G2 is managed by U1: (a) G2 has uManager set to U1 (b) G2 has gManager set to G1
      Parameters:
      key - manager key
      Returns:
      groups managed by the user for the given key
    • findManagedAnyObjects

      List<AnyObject> findManagedAnyObjects(String key)
      Returns all any objects managed by the user for the given key. Given: * user U for the provided key, member of group G1 * any object O, member of group G2 then we have 4 cases where O is managed by U: (a) O has uManager set to U (b) G2 has uManager set to U (c) O has gManager set to G1 (d) G2 has gManager set to G1
      Parameters:
      key - manager key
      Returns:
      any objects managed by the user for the given key
    • countByRealm

      Map<String,Long> countByRealm()
    • countByStatus

      Map<String,Long> countByStatus()
    • findByUsername

      Optional<? extends User> findByUsername(String username)
    • findByToken

      Optional<? extends User> findByToken(String token)
    • findBySecurityQuestion

      List<User> findBySecurityQuestion(SecurityQuestion securityQuestion)
    • deleteMembership

      void deleteMembership(UMembership membership)
    • findAllRoles

      Collection<Role> findAllRoles(User user)
    • findAllGroups

      Collection<Group> findAllGroups(User user)
    • findAllGroupKeys

      Collection<String> findAllGroupKeys(User user)
    • findAllGroupNames

      Collection<String> findAllGroupNames(User user)
    • findAllResources

      Collection<ExternalResource> findAllResources(User user)
    • linkedAccountExists

      boolean linkedAccountExists(String userKey, String connObjectKeyValue)
    • findLinkedAccount

      Optional<? extends LinkedAccount> findLinkedAccount(ExternalResource resource, String connObjectKeyValue)
    • findLinkedAccounts

      List<LinkedAccount> findLinkedAccounts(String userKey)
    • findLinkedAccountsByResource

      List<LinkedAccount> findLinkedAccountsByResource(ExternalResource resource)