com.atlassian.confluence.api.impl.service.permissions
Class ContentRestrictionServiceImpl
java.lang.Object
com.atlassian.confluence.api.impl.service.permissions.ContentRestrictionServiceImpl
- All Implemented Interfaces:
- ContentRestrictionService
public class ContentRestrictionServiceImpl
- extends Object
- implements ContentRestrictionService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContentRestrictionServiceImpl
public ContentRestrictionServiceImpl(ContentEntityManagerInternal contentEntityManager,
PermissionManager permissionManager,
ContentRestrictionFactory contentRestrictionFactory,
NavigationService navigationService)
getRestrictionsGroupByOperation
public Map<OperationKey,ContentRestriction> getRestrictionsGroupByOperation(ContentId target,
Expansion... allExpansions)
throws NotFoundException
- Description copied from interface:
ContentRestrictionService
- List all restrictions that exist directly on the given content. Note that the subjects returned in each
ContentRestriction are hard-limited to an arbitrary maximum size. Obtaining more can be done via the
ContentRestrictionService.getRestrictionsForOperation(com.atlassian.confluence.api.model.content.id.ContentId, com.atlassian.confluence.api.model.permissions.OperationKey, com.atlassian.confluence.api.model.pagination.PageRequest, com.atlassian.confluence.api.model.Expansion...)
method.
- Specified by:
getRestrictionsGroupByOperation
in interface ContentRestrictionService
- Parameters:
target
- the id of the content to look up permissions forallExpansions
- the expansions to apply to the returned data. These expansions start from the operation itself.
- Returns:
- a Map of all ContentRestrictions, grouped by operation key
- Throws:
NotFoundException
- if given content id does not exist, or is not viewable by user
getRestrictionsForOperation
public ContentRestriction getRestrictionsForOperation(ContentId target,
OperationKey operationKey,
PageRequest pageRequest,
Expansion... allExpansions)
throws NotFoundException
- Description copied from interface:
ContentRestrictionService
- Retrieves all restrictions for given operation key on given content.
- Specified by:
getRestrictionsForOperation
in interface ContentRestrictionService
- Parameters:
target
- the id of the content to look up permissions foroperationKey
- the operation key to look up restrictions forpageRequest
- pagination through the subjects contained within the ContentRestrictionallExpansions
- the expansions to the ContentRestriction.
- Returns:
- ContentRestriction containing relevant restrictions for given operation key, or null if operation key does not have corresponding restrictions.
- Throws:
NotFoundException
- if given content id does not exist, or is not viewable by user, or if the given operation key is not recognised for the content.
Copyright © 2003–2015 Atlassian. All rights reserved.