Interface WatchService.Validator
- All Known Implementing Classes:
WatchServiceImpl.ValidatorImpl
- Enclosing interface:
- WatchService
public static interface WatchService.Validator
Provides methods for validating the permissions to watch / unwatch space / content / labels.
-
Method Summary
Modifier and TypeMethodDescriptionValidate that the requesting User can view the list of Users watching the given Content identified by contentId.Validate that the requesting User can view the list of Users watching the given Space identified by spaceKey.validateWatchContent
(com.atlassian.sal.api.user.UserKey userKey, ContentId content) Validate that the user can watch a Content.validateWatchSpace
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Validate that the user can see a Space.
-
Method Details
-
validateWatchSpace
Validate that the user can see a Space.- Parameters:
userKey
- the user to add or remove as a watcherspaceKey
- the space to be watched- Returns:
- an immutable Validation result.
-
validateWatchContent
ValidationResult validateWatchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId content) Validate that the user can watch a Content.- Parameters:
userKey
- the key of the user to add as a watchercontent
- the content to be watched- Returns:
- an immutable Validation result.
-
validateFindUsersWatchingSpacePaginated
Validate that the requesting User can view the list of Users watching the given Space identified by spaceKey. Only a Confluence Administrator or Space Administrator can perform this action.- Parameters:
spaceKey
- the key of the Space the User is attempting to view.- Returns:
- an immutable Validation result.
- Since:
- 8.9.0
-
validateFindUsersWatchingContentPaginated
Validate that the requesting User can view the list of Users watching the given Content identified by contentId. Only a Confluence Administrator or Space Administrator can perform this action.- Parameters:
contentId
- the id of the Content the User is attempting to view.- Returns:
- an immutable Validation result.
- Since:
- 8.9.0
-