Package com.codebarrel.jira.user
Interface UserService
- All Known Implementing Classes:
NativeUserService
public interface UserService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longLimits how many users will be returned by methods that returns lists of matching users. -
Method Summary
Modifier and TypeMethodDescriptionintgetEstimatedUserCount(TenantContext context) Gets the estimated total count of users from the remote tenant.getMyself(TenantActor tenantActor) Looks up myself on the remote tenant.getUser(TenantActor tenantActor, String userKey) Deprecated.getUserByAccountId(TenantActor tenantActor, String accountId) Looks up a user on the remote tenant using the new accountId.getUserByName(TenantActor tenantActor, String username) Deprecated.usegetUserByAccountId(TenantActor, String)insteadgetUsersByEmail(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 callgetUser(TenantActor, String)in case e-mails are masked/hidden as a fallback.booleanisAutomationAppUser(TenantContext context, String userAccountId) Determines if the passed in user account id, matches the app user in cloud.resolveEmail(TenantActor tenantActor, UserBean user) Retrieves a user's e-mail address
-
Field Details
-
MAX_USERS
static final long MAX_USERSLimits how many users will be returned by methods that returns lists of matching users.- See Also:
-
-
Method Details
-
isAutomationAppUser
Determines if the passed in user account id, matches the app user in cloud.- Parameters:
context- The tenant execution contextuserAccountId- the user's account id to check.- Returns:
- true if the passed user is the app user.
-
getMyself
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
Looks up a user on the remote tenant using the new accountId.- Parameters:
tenantActor- The tenant context to retrieve the user details fromaccountId- The user to lookup.- Returns:
- The UserBean or null if no user could be found.
-
getUser
Deprecated.usegetUserByAccountId(TenantActor, String)insteadLooks up a user on the remote tenant.- Parameters:
tenantActor- The tenant context to retrieve the user details fromuserKey- The user to lookup.- Returns:
- The UserBean or null if no user could be found.
-
getUserByName
Deprecated.usegetUserByAccountId(TenantActor, String)insteadLooks 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 fromusername- The user to lookup.- Returns:
- The UserBean or null if no user could be found.
-
getUsersByEmail
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 fromemail- The e-mail address of the user- Returns:
- The UserBean or null if no user could be found.
-
getEstimatedUserCount
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
Retrieves a user's e-mail address- Parameters:
tenantActor- The tenant context to retrieve the user details fromuser- the user lookup e-mail for- Returns:
- Email or empty
-
getUserByAccountId(TenantActor, String)instead