Package com.atlassian.bitbucket.user
Interface RecentlyAccessedRepositoriesService
public interface RecentlyAccessedRepositoriesService
Provides a history of repositories users have browsed.
-
Method Summary
Modifier and TypeMethodDescriptionfindByCurrentUser
(Permission permission, PageRequest pageRequest) Returns a page of repositories accessed most recently by the current user.findByCurrentUser
(PageRequest pageRequest) Returns a page of repositories accessed most recently by the current user.
-
Method Details
-
findByCurrentUser
Returns a page of repositories accessed most recently by the current user. The list is ordered most recent to least recent. Only repositories the usercan currently access
are returned.This method provides exactly the same result as
findByCurrentUser(Permission, PageRequest)
invoked withPermission.REPO_READ
.- Parameters:
pageRequest
- describes the page of recently accessed repositories to retrieve- Returns:
- page of repositories recently accessed by the current user
- Throws:
AuthorisationException
- if there is no current effective user- See Also:
-
findByCurrentUser
@Nonnull Page<Repository> findByCurrentUser(@Nonnull Permission permission, @Nonnull PageRequest pageRequest) Returns a page of repositories accessed most recently by the current user. The list is ordered most recent to least recent. Only repositories the user can currently access at the level specified bypermission
are returned.- Parameters:
permission
- the permission that the effective user has to have with regards to the returned repositories. The permission has to berepository-related
pageRequest
- describes the page of recently accessed repositories to retrieve- Returns:
- page of repositories recently accessed by the current user
- Throws:
AuthorisationException
- if there is no current effective userArgumentValidationException
- if the permission is not related to repository
-