Interface FavouriteManager
- All Known Implementing Classes:
DefaultFavouriteManager
public interface FavouriteManager
Manages the favourite spaces and pages of a user.
A caller of this API has permission to add or remove a favourite if either:
- The caller is the user that the favourite is added or removed on behalf of.
- The caller is a confluence administrator.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddPageToFavourites(ConfluenceUser user, AbstractPage page) Add a page or blog post to a user's favourites by attaching a personal label to the space.voidaddPageToFavourites(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.default voidaddSpaceToFavourites(ConfluenceUser user, Space space) Add a space to a user's favourites by attaching a personal label to the space.voidaddSpaceToFavourites(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useaddSpaceToFavourites(ConfluenceUser, Space)default booleanhasPermission(ConfluenceUser user, AbstractPage page) Get whether the current user has permission to add or remove a page favourite.default booleanhasPermission(ConfluenceUser user, Space space) Get whether the current user has permission to add or remove a space favourite.booleanhasPermission(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 usehasPermission(ConfluenceUser, AbstractPage)booleanhasPermission(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 usehasPermission(ConfluenceUser, Space)default booleanisUserFavourite(ConfluenceUser user, AbstractPage page) Returns whether a page or blog post is marked as a favourite for a user.default booleanisUserFavourite(ConfluenceUser user, Space space) Returns whether a space is marked as a favourite for a user.booleanisUserFavourite(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useisUserFavourite(ConfluenceUser, AbstractPage)booleanisUserFavourite(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useisUserFavourite(ConfluenceUser, Space)default voidremovePageFromFavourites(ConfluenceUser user, AbstractPage page) Remove a page or blog post from a user's favourites.voidremovePageFromFavourites(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useremovePageFromFavourites(ConfluenceUser, AbstractPage)default voidremoveSpaceFromFavourites(ConfluenceUser user, Space space) Remove a space from a user's favourites.voidremoveSpaceFromFavourites(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useremoveSpaceFromFavourites(ConfluenceUser, Space)
-
Method Details
-
isUserFavourite
Returns whether a space is marked as a favourite for a user.- Since:
- 9.5
-
isUserFavourite
@Deprecated(forRemoval=true, since="9.5") boolean isUserFavourite(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useisUserFavourite(ConfluenceUser, Space)Returns whether a space is marked as a favourite for a user.- Since:
- 5.9
-
hasPermission
Get whether the current user has permission to add or remove a space favourite.- Since:
- 9.5
-
hasPermission
@Deprecated(forRemoval=true, since="9.5") boolean hasPermission(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 usehasPermission(ConfluenceUser, Space)Get whether the current user has permission to add or remove a space favourite.- Since:
- 5.9
-
addSpaceToFavourites
Add a space to a user's favourites by attaching a personal label to the space.- Parameters:
user- The user to add the favourite on behalf of.space- The space to add the favourite to.- Throws:
NotAuthorizedException- If the current user doesn't have permission to add the favourite.org.springframework.dao.DataAccessException- If the label save operation fails.- Since:
- 9.5
-
addSpaceToFavourites
@Deprecated(forRemoval=true, since="9.5") void addSpaceToFavourites(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useaddSpaceToFavourites(ConfluenceUser, Space)Add a space to a user's favourites by attaching a personal label to the space.- Parameters:
user- The user to add the favourite on behalf of.space- The space to add the favourite to.- Throws:
NotAuthorizedException- If the current user doesn't have permission to add the favourite.org.springframework.dao.DataAccessException- If the label save operation fails.- Since:
- 5.9
-
removeSpaceFromFavourites
Remove a space from a user's favourites.- Parameters:
user- The user to remove the favourite on behalf of.space- The space to remove the favourite from.- Throws:
NotAuthorizedException- If the current user doesn't have permission to remove the favourite.org.springframework.dao.DataAccessException- If the label delete operation fails.- Since:
- 9.5
-
removeSpaceFromFavourites
@Deprecated(forRemoval=true, since="9.5") void removeSpaceFromFavourites(com.atlassian.user.User user, Space space) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useremoveSpaceFromFavourites(ConfluenceUser, Space)Remove a space from a user's favourites.- Parameters:
user- The user to remove the favourite on behalf of.space- The space to remove the favourite from.- Throws:
NotAuthorizedException- If the current user doesn't have permission to remove the favourite.org.springframework.dao.DataAccessException- If the label delete operation fails.- Since:
- 5.9
-
isUserFavourite
Returns whether a page or blog post is marked as a favourite for a user.- Since:
- 9.5
-
isUserFavourite
@Deprecated(forRemoval=true, since="9.5") boolean isUserFavourite(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useisUserFavourite(ConfluenceUser, AbstractPage)Returns whether a page or blog post is marked as a favourite for a user. -
hasPermission
Get whether the current user has permission to add or remove a page favourite.- Since:
- 9.5
-
hasPermission
@Deprecated(forRemoval=true, since="9.5") boolean hasPermission(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 usehasPermission(ConfluenceUser, AbstractPage)Get whether the current user has permission to add or remove a page favourite.- Since:
- 5.9
-
addPageToFavourites
Add a page or blog post to a user's favourites by attaching a personal label to the space.- Parameters:
user- The user to add the favourite on behalf of.space- The space to add the favourite to.- Throws:
NotAuthorizedException- Thrown if the current user doesn't have permission to add the favourite.org.springframework.dao.DataAccessException- If the label save operation fails.- Since:
- 9.5
-
addPageToFavourites
@Deprecated(forRemoval=true, since="9.5") void addPageToFavourites(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useaddPageToFavourites(ConfluenceUser, AbstractPage)Add a page or blog post to a user's favourites by attaching a personal label to the space.- Parameters:
user- The user to add the favourite on behalf of.space- The space to add the favourite to.- Throws:
NotAuthorizedException- Thrown if the current user doesn't have permission to add the favourite.org.springframework.dao.DataAccessException- If the label save operation fails.
-
removePageFromFavourites
Remove a page or blog post from a user's favourites.- Parameters:
user- The user to remove the favourite on behalf of.space- The space to remove the favourite from.- Throws:
NotAuthorizedException- If the current user doesn't have permission to remove the favourite.org.springframework.dao.DataAccessException- If the label delete operation fails.- Since:
- 9.5
-
removePageFromFavourites
@Deprecated(forRemoval=true, since="9.5") void removePageFromFavourites(com.atlassian.user.User user, AbstractPage page) Deprecated, for removal: This API element is subject to removal in a future version.since 9.5 useremovePageFromFavourites(ConfluenceUser, AbstractPage)Remove a page or blog post from a user's favourites.- Parameters:
user- The user to remove the favourite on behalf of.space- The space to remove the favourite from.- Throws:
NotAuthorizedException- If the current user doesn't have permission to remove the favourite.org.springframework.dao.DataAccessException- If the label delete operation fails.
-
addPageToFavourites(ConfluenceUser, AbstractPage)