@ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public class WatchServiceImpl extends Object implements WatchService
Modifier and Type | Class and Description |
---|---|
class |
WatchServiceImpl.ValidatorImpl |
WatchService.Validator
Constructor and Description |
---|
WatchServiceImpl(UserAccessor userAccessor,
PermissionManager permissionManager,
NotificationManager notificationManager,
SpaceManager spaceManager,
SpaceService spaceService,
ContentEntityManager contentEntityManager,
ContentService contentService,
AccessModeService accessModeService) |
Modifier and Type | Method and 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 given
content |
void |
unwatchSpace(com.atlassian.sal.api.user.UserKey userKey,
String spaceKey)
Remove a watch to the given
space |
void |
unwatchSpace(com.atlassian.sal.api.user.UserKey userKey,
String spaceKey,
List<ContentType> contentTypes)
Remove a watch to the given
space |
WatchService.Validator |
validator()
Get the validator of the
WatchService . |
ContentWatch |
watchContent(com.atlassian.sal.api.user.UserKey userKey,
ContentId contentId)
Create a watch to the given
content |
@NonNull SpaceWatch |
watchSpace(com.atlassian.sal.api.user.UserKey userKey,
String spaceKey)
Create a watch to the given
space |
@NonNull SpaceWatch |
watchSpace(com.atlassian.sal.api.user.UserKey userKey,
String spaceKey,
List<ContentType> contentTypes)
Create a watch to the given
space |
public WatchServiceImpl(UserAccessor userAccessor, PermissionManager permissionManager, NotificationManager notificationManager, SpaceManager spaceManager, SpaceService spaceService, ContentEntityManager contentEntityManager, ContentService contentService, AccessModeService accessModeService)
public boolean isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, ContentType contentType)
isWatchingSpace
in interface WatchService
userKey
- the watcherspaceKey
- the key of the space to checkcontentType
- the content typespace
or notpublic final @NonNull SpaceWatch watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
WatchService
space
watchSpace
in interface WatchService
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 only ContentType.BLOG_POST
is supported if suppliedpublic final @NonNull SpaceWatch watchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
WatchService
space
watchSpace
in interface WatchService
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to add the watch forpublic final void unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey, List<ContentType> contentTypes)
WatchService
space
unwatchSpace
in interface WatchService
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 only ContentType.BLOG_POST
is supported if suppliedpublic final void unwatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
WatchService
space
unwatchSpace
in interface WatchService
userKey
- the key of the user to add as a watcherspaceKey
- the key of the space to remove the watch forpublic final boolean isWatchingSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey)
isWatchingSpace
in interface WatchService
userKey
- the watcherspaceKey
- the key of the space to checkspace
or notpublic final ContentWatch watchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
WatchService
content
watchContent
in interface WatchService
userKey
- the key of the user to add as a watchercontentId
- the id of the content to add the watch forpublic final void unwatchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
WatchService
content
unwatchContent
in interface WatchService
userKey
- the key of the user to add as a watchercontentId
- the id of the content to remove the watch forpublic final boolean isWatchingContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId)
isWatchingContent
in interface WatchService
userKey
- the watchercontentId
- the id of the content to checkcontent
or notpublic WatchService.Validator validator()
WatchService
WatchService
.validator
in interface WatchService
Copyright © 2003–2019 Atlassian. All rights reserved.