Class WatchServiceImpl.ValidatorImpl
java.lang.Object
com.atlassian.confluence.api.impl.service.watch.WatchServiceImpl.ValidatorImpl
- All Implemented Interfaces:
WatchService.Validator
- Enclosing class:
- WatchServiceImpl
-
Constructor Summary
Constructors -
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.final ValidationResult
validateWatchContent
(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Validate that the user can watch a Content.final ValidationResult
validateWatchSpace
(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Validate that the user can see a Space.
-
Constructor Details
-
ValidatorImpl
public ValidatorImpl()
-
-
Method Details
-
validateWatchSpace
public final ValidationResult validateWatchSpace(com.atlassian.sal.api.user.UserKey userKey, String spaceKey) Description copied from interface:WatchService.Validator
Validate that the user can see a Space.- Specified by:
validateWatchSpace
in interfaceWatchService.Validator
- Parameters:
userKey
- the user to add or remove as a watcherspaceKey
- the space to be watched- Returns:
- an immutable Validation result.
-
validateWatchContent
public final ValidationResult validateWatchContent(com.atlassian.sal.api.user.UserKey userKey, ContentId contentId) Description copied from interface:WatchService.Validator
Validate that the user can watch a Content.- Specified by:
validateWatchContent
in interfaceWatchService.Validator
- Parameters:
userKey
- the key of the user to add as a watchercontentId
- the content to be watched- Returns:
- an immutable Validation result.
-
validateFindUsersWatchingSpacePaginated
Description copied from interface:WatchService.Validator
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.- Specified by:
validateFindUsersWatchingSpacePaginated
in interfaceWatchService.Validator
- Parameters:
spaceKey
- the key of the Space the User is attempting to view.- Returns:
- an immutable Validation result.
-
validateFindUsersWatchingContentPaginated
Description copied from interface:WatchService.Validator
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.- Specified by:
validateFindUsersWatchingContentPaginated
in interfaceWatchService.Validator
- Parameters:
contentId
- the id of the Content the User is attempting to view.- Returns:
- an immutable Validation result.
-