Interface UserService

All Known Implementing Classes:
NativeUserService

public interface UserService
  • Field Details

    • MAX_USERS

      static final long MAX_USERS
      Limits how many users will be returned by methods that returns lists of matching users.
      See Also:
  • Method Details

    • isAutomationAppUser

      boolean isAutomationAppUser(TenantContext context, String userAccountId)
      Determines if the passed in user account id, matches the app user in cloud.
      Parameters:
      context - The tenant execution context
      userAccountId - the user's account id to check.
      Returns:
      true if the passed user is the app user.
    • getMyself

      Optional<UserBean> getMyself(TenantActor tenantActor)
      Looks up myself on the remote tenant.
      Parameters:
      tenantActor - The tenant context to retrieve the user details from
      Returns:
      The UserBean or null if no user could be found.
    • getUserByAccountId

      Optional<UserBean> getUserByAccountId(TenantActor tenantActor, String accountId)
      Looks up a user on the remote tenant using the new accountId.
      Parameters:
      tenantActor - The tenant context to retrieve the user details from
      accountId - The user to lookup.
      Returns:
      The UserBean or null if no user could be found.
    • getUser

      @Deprecated Optional<UserBean> getUser(TenantActor tenantActor, String userKey)
      Looks up a user on the remote tenant.
      Parameters:
      tenantActor - The tenant context to retrieve the user details from
      userKey - The user to lookup.
      Returns:
      The UserBean or null if no user could be found.
    • getUserByName

      @Deprecated Optional<UserBean> getUserByName(TenantActor tenantActor, String username)
      Looks up a user on the remote tenant by username. In general you *should not* use this method and use the lookup by key above!
      Parameters:
      tenantActor - The tenant context to retrieve the user details from
      username - The user to lookup.
      Returns:
      The UserBean or null if no user could be found.
    • getUsersByEmail

      List<UserBean> getUsersByEmail(TenantActor tenantActor, String email)
      This will try the following:
      • Run a search for users with this e-mail address
      • Only return users where there's a case insensitive match for e-mail address
      • If that search didn't find anything it will call getUser(TenantActor, String) in case e-mails are masked/hidden as a fallback.
      Parameters:
      tenantActor - The tenant context to retrieve the user details from
      email - The e-mail address of the user
      Returns:
      The UserBean or null if no user could be found.
    • getEstimatedUserCount

      int getEstimatedUserCount(TenantContext context)
      Gets the estimated total count of users from the remote tenant.
      Parameters:
      context - The tenant context to retrieve the count from
      Returns:
      count of users
    • resolveEmail

      Optional<String> resolveEmail(TenantActor tenantActor, UserBean user)
      Retrieves a user's e-mail address
      Parameters:
      tenantActor - The tenant context to retrieve the user details from
      user - the user lookup e-mail for
      Returns:
      Email or empty