Class DefaultFavouriteManager
java.lang.Object
com.atlassian.confluence.impl.userstatus.DefaultFavouriteManager
- All Implemented Interfaces:
FavouriteManager
The default implementation of the Favourite Manager which uses a label on
the entity to mark it as a favourite.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFavouriteManager(SpaceManager spaceManager, LabelManager labelManager, LabelPermissionEnforcer labelPermissionEnforcer) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPageToFavourites(ConfluenceUser user, AbstractPage page) Add a page or blog post to a user's favourites by attaching a personal label to the space.voidaddSpaceToFavourites(ConfluenceUser user, Space space) Add a space to a user's favourites by attaching a personal label to the space.booleanhasPermission(ConfluenceUser user, AbstractPage page) Get whether the current user has permission to add or remove a page favourite.booleanhasPermission(ConfluenceUser user, Space space) Get whether the current user has permission to add or remove a space favourite.booleanisUserFavourite(ConfluenceUser user, AbstractPage page) Returns whether a page or blog post is marked as a favourite for a user.booleanisUserFavourite(ConfluenceUser user, Space space) Returns whether a space is marked as a favourite for a user.voidremovePageFromFavourites(ConfluenceUser user, AbstractPage page) Remove a page or blog post from a user's favourites.voidremoveSpaceFromFavourites(ConfluenceUser user, Space space) Remove a space from a user's favourites.
-
Constructor Details
-
DefaultFavouriteManager
public DefaultFavouriteManager(SpaceManager spaceManager, LabelManager labelManager, LabelPermissionEnforcer labelPermissionEnforcer)
-
-
Method Details
-
isUserFavourite
Description copied from interface:FavouriteManagerReturns whether a space is marked as a favourite for a user.- Specified by:
isUserFavouritein interfaceFavouriteManager
-
addSpaceToFavourites
Description copied from interface:FavouriteManagerAdd a space to a user's favourites by attaching a personal label to the space.- Specified by:
addSpaceToFavouritesin interfaceFavouriteManager- Parameters:
user- The user to add the favourite on behalf of.space- The space to add the favourite to.
-
removeSpaceFromFavourites
Description copied from interface:FavouriteManagerRemove a space from a user's favourites.- Specified by:
removeSpaceFromFavouritesin interfaceFavouriteManager- Parameters:
user- The user to remove the favourite on behalf of.space- The space to remove the favourite from.
-
isUserFavourite
Description copied from interface:FavouriteManagerReturns whether a page or blog post is marked as a favourite for a user.- Specified by:
isUserFavouritein interfaceFavouriteManager
-
addPageToFavourites
Description copied from interface:FavouriteManagerAdd a page or blog post to a user's favourites by attaching a personal label to the space.- Specified by:
addPageToFavouritesin interfaceFavouriteManager- Parameters:
user- The user to add the favourite on behalf of.
-
removePageFromFavourites
Description copied from interface:FavouriteManagerRemove a page or blog post from a user's favourites.- Specified by:
removePageFromFavouritesin interfaceFavouriteManager- Parameters:
user- The user to remove the favourite on behalf of.
-
hasPermission
Description copied from interface:FavouriteManagerGet whether the current user has permission to add or remove a space favourite.- Specified by:
hasPermissionin interfaceFavouriteManager
-
hasPermission
Description copied from interface:FavouriteManagerGet whether the current user has permission to add or remove a page favourite.- Specified by:
hasPermissionin interfaceFavouriteManager
-