@Deprecated public interface

DeprecatedUserService

com.atlassian.stash.user.DeprecatedUserService
Known Indirect Subclasses

Class Overview

Contains methods which are in some phase of deprecation in preparation for being removed from the UserService. Each method will be annotated with its deprecation lifecycle, indicating in which version it will be fully removed.

Note: Calling code should not reference this interface directly, as it will be removed in a future release. It exists to group together the large number of deprecated methods slated for removal from the UserService. Calling code should always reference UserService.

Summary

Public Methods
@Deprecated @Nonnull Page<String> findAllGroups(PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findGroups(PageRequest)
@Deprecated @Nonnull Page<? extends StashUser> findAllUsers(boolean returnDeletedUsers, PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsers(PageRequest). There is no replacement for the ability to retrieve deleted users; that functionality has been removed.
@Deprecated @Nonnull Page<? extends StashUser> findAllUsers(PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsers(PageRequest)
@Deprecated @Nonnull Page<String> findGroupsByContainedText(String containedText, PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findGroupsByName(String, PageRequest)
@Deprecated @Nonnull Page<? extends StashUser> findUsersByContainedText(String containedText, PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsersByName(String, PageRequest)
@Deprecated @Nonnull Page<? extends StashUser> findUsersByContainedText(String containedText, boolean includeDeletedUsers, PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsersByName(String, PageRequest). There is no replacement for the ability to retrieve deleted users; that functionality has been removed.
@Deprecated @Nonnull Page<String> getGroupsForUser(String username, PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findGroupsByUser(String, PageRequest)
@Deprecated @Nullable StashUser getUser(Integer id)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by getUserById(int)
@Deprecated @Nullable StashUser getUser(String name, boolean returnDeletedUsers)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by getUserByName(String, boolean)
@Deprecated @Nullable StashUser getUser(String name)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by getUserByName(String)
@Deprecated @Nonnull Page<String> getUsersInGroup(String groupName, PageRequest pageRequest)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsersByGroup(String, PageRequest)
@Deprecated boolean isUserMemberOfGroup(String username, String group)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by isUserInGroup(String, String)
@Deprecated boolean isUserMemberOfGroup(StashUser user, String group)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by isUserInGroup(StashUser, String)
@Deprecated @Nonnull StashUser updateProfile(String displayName, String email)
This method is deprecated. Deprecated in 2.0 for removal in 3.0. This method has been replaced by updateUser(String, String)

Public Methods

@Deprecated @Nonnull public Page<String> findAllGroups (PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findGroups(PageRequest)

Parameters
pageRequest start an limit of the page
Returns
  • the page of group names

@Deprecated @Nonnull public Page<? extends StashUser> findAllUsers (boolean returnDeletedUsers, PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsers(PageRequest). There is no replacement for the ability to retrieve deleted users; that functionality has been removed.

Retrieves a page of users.

Note: As of Stash 2.0, it is no longer possible to retrieve deleted users by calling this method. The returnDeletedUsers parameter is ignored. The results returned will never include users which have been deleted.

Parameters
returnDeletedUsers ignored
pageRequest specifies the start and limit of the requested page
Returns
  • the page of users. Can be empty, but not null

@Deprecated @Nonnull public Page<? extends StashUser> findAllUsers (PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsers(PageRequest)

Retrieves a page of users.

Parameters
pageRequest specifies the start and limit of the requested page
Returns
  • the page of users. Can be empty, but not null.

@Deprecated @Nonnull public Page<String> findGroupsByContainedText (String containedText, PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findGroupsByName(String, PageRequest)

Parameters
containedText text to be contained in the group name
pageRequest start and limit of the page
Returns
  • a page of groups which contain containedText in the group name, or all groups if null or empty

@Deprecated @Nonnull public Page<? extends StashUser> findUsersByContainedText (String containedText, PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsersByName(String, PageRequest)

Retrieves a page of users, filtered by username.

Note: As of Stash 2.0, this method now includes e-mail addresses and display names in its filtering, not just the username. This may result in additional results being returned that were not returned previously.

Parameters
containedText text to be contained in the username
pageRequest start and limit of the page
Returns
  • a page of users which contain containedText in the username, or all users if null or empty

@Deprecated @Nonnull public Page<? extends StashUser> findUsersByContainedText (String containedText, boolean includeDeletedUsers, PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsersByName(String, PageRequest). There is no replacement for the ability to retrieve deleted users; that functionality has been removed.

Retrieves a page of users, filtered by username.

Note: As of Stash 2.0, this method now includes e-mail addresses and display names in its filtering, not just the username. This may result in additional results being returned that were not returned previously. Additionally, it is no longer possible to retrieve deleted users by calling this method. The returnDeletedUsers parameter is ignored. The results returned will never include users which have been deleted.

Parameters
containedText text to be contained in the username
includeDeletedUsers ignored
pageRequest start and limit of the page
Returns
  • a page of users which contain containedText in the username, or all users if null or empty

@Deprecated @Nonnull public Page<String> getGroupsForUser (String username, PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findGroupsByUser(String, PageRequest)

Retrieves a page of groups that the provided user is a member of.

Parameters
username the username
pageRequest the start and limit of the page
Returns
  • the page of groups. Can be empty, but not null

@Deprecated @Nullable public StashUser getUser (Integer id)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by getUserById(int)

Retrieves a user by its ID.

Parameters
id the user's ID
Returns
  • the specified user if they exist

@Deprecated @Nullable public StashUser getUser (String name, boolean returnDeletedUsers)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by getUserByName(String, boolean)

Parameters
name the user's username
returnDeletedUsers if true, this method will return StashUsers which have been deleted from the underlying user store, but still exist in Stash. Deleted users will have only a minimal set of information (e.g. no email address or display name).
Returns
  • the specified user, or null if they have never existed or they have been deleted and returnDeletedUsers is false
See Also

@Deprecated @Nullable public StashUser getUser (String name)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by getUserByName(String)

Retrieves a user by its name.

Parameters
name the user's username
Returns
  • the specified user if they exist

@Deprecated @Nonnull public Page<String> getUsersInGroup (String groupName, PageRequest pageRequest)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by findUsersByGroup(String, PageRequest)

Retrieves a page of members of the provided group

Parameters
groupName the group
pageRequest the start and limit of the page
Returns
  • the page of groups. Can be empty, but not null

@Deprecated public boolean isUserMemberOfGroup (String username, String group)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by isUserInGroup(String, String)

Checks whether the provided user is a member of the provided group

Parameters
username the username
group the group
Returns
  • whether the provided user is a member of the provided group

@Deprecated public boolean isUserMemberOfGroup (StashUser user, String group)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by isUserInGroup(StashUser, String)

Checks whether the provided user is a member of the provided group

Parameters
user the username
group the group
Returns
  • whether the provided user is a member of the provided group

@Deprecated @Nonnull public StashUser updateProfile (String displayName, String email)

This method is deprecated.
Deprecated in 2.0 for removal in 3.0. This method has been replaced by updateUser(String, String)

Update the profile of the current user.

Parameters
displayName the user's new display name
email the user's new email address
Returns
  • the updated user