Class WatchServiceImpl
- java.lang.Object
-
- com.atlassian.confluence.api.impl.service.watch.WatchServiceImpl
-
- All Implemented Interfaces:
WatchService
@ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public class WatchServiceImpl extends Object implements WatchService
- Since:
- 6.5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
WatchServiceImpl.ValidatorImpl
Deprecated.since 7.9-
Nested classes/interfaces inherited from interface com.atlassian.confluence.api.service.watch.WatchService
WatchService.Validator
-
-
Constructor Summary
Constructors Constructor Description WatchServiceImpl(ConfluenceUserResolver confluenceUserResolver, PermissionManager permissionManager, NotificationManager notificationManager, SpaceManager spaceManager, SpaceService spaceService, ContentEntityManager contentEntityManager, ContentService contentService, AccessModeService accessModeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
isWatchingContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
boolean
isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
boolean
isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType)
void
unwatchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Remove a watch to the givencontent
void
unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Remove a watch to the givenspace
void
unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
Remove a watch to the givenspace
WatchService.Validator
validator()
Deprecated.since 7.9ContentWatch
watchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Create a watch to the givencontent
@NonNull SpaceWatch
watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Create a watch to the givenspace
@NonNull SpaceWatch
watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
Create a watch to the givenspace
-
-
-
Constructor Detail
-
WatchServiceImpl
public WatchServiceImpl(ConfluenceUserResolver confluenceUserResolver, PermissionManager permissionManager, NotificationManager notificationManager, SpaceManager spaceManager, SpaceService spaceService, ContentEntityManager contentEntityManager, ContentService contentService, AccessModeService accessModeService)
-
-
Method Detail
-
isWatchingSpace
public boolean isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType)
- Specified by:
isWatchingSpace
in interfaceWatchService
- Parameters:
userKey
- the watcherspaceKey
- the key of the space to checkcontentType
- the content type- Returns:
- whether the user is watching the specific content type in the given
space
or not
-
watchSpace
public final @NonNull SpaceWatch watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
Description copied from interface:WatchService
Create a watch to the givenspace
- Specified by:
watchSpace
in interfaceWatchService
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to add the watch forcontentTypes
- the content types to remove the watch for, currently onlyContentType.BLOG_POST
is supported if supplied
-
watchSpace
public final @NonNull SpaceWatch watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Description copied from interface:WatchService
Create a watch to the givenspace
- Specified by:
watchSpace
in interfaceWatchService
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to add the watch for
-
unwatchSpace
public final void unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
Description copied from interface:WatchService
Remove a watch to the givenspace
- Specified by:
unwatchSpace
in interfaceWatchService
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to remove the watch forcontentTypes
- the content type to remove the watch for, currently onlyContentType.BLOG_POST
is supported if supplied
-
unwatchSpace
public final void unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
Description copied from interface:WatchService
Remove a watch to the givenspace
- Specified by:
unwatchSpace
in interfaceWatchService
- Parameters:
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to remove the watch for
-
isWatchingSpace
public final boolean isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
- Specified by:
isWatchingSpace
in interfaceWatchService
- Parameters:
userKey
- the watcherspaceKey
- the key of the space to check- Returns:
- whether the user is watching the given
space
or not
-
watchContent
public final ContentWatch watchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Description copied from interface:WatchService
Create a watch to the givencontent
- Specified by:
watchContent
in interfaceWatchService
- Parameters:
userKey
- the key of the user to add as a watchercontentId
- the id of the content to add the watch for
-
unwatchContent
public final void unwatchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
Description copied from interface:WatchService
Remove a watch to the givencontent
- Specified by:
unwatchContent
in interfaceWatchService
- Parameters:
userKey
- the key of the user to add as a watchercontentId
- the id of the content to remove the watch for
-
isWatchingContent
public final boolean isWatchingContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
- Specified by:
isWatchingContent
in interfaceWatchService
- Parameters:
userKey
- the watchercontentId
- the id of the content to check- Returns:
- whether the user is watching the given
content
or not
-
validator
@Deprecated public WatchService.Validator validator()
Deprecated.since 7.9Description copied from interface:WatchService
Get the validator of theWatchService
.- Specified by:
validator
in interfaceWatchService
- Returns:
- a Validator that can be used to validate service requests.
-
-