com.atlassian.confluence.rest.client
Interface RemoteContentRestrictionService

All Known Implementing Classes:
RemoteContentRestrictionServiceImpl

@ExperimentalApi
public interface RemoteContentRestrictionService

ContentRestrictionService implementation that communicates with Confluence remotely using the Confluence REST API. Provides future returning equivalents for the methods in ContentRestrictionService.

Since:
5.7

Method Summary
 com.atlassian.util.concurrent.Promise<ContentRestriction> getRestrictionsForOperation(ContentId target, OperationKey operationKey, PageRequest pageRequest, Expansion... expansions)
          Retrieves all restrictions for given operation key on given content.
 com.atlassian.util.concurrent.Promise<Map<OperationKey,ContentRestriction>> getRestrictionsGroupByOperation(ContentId target, Expansion... expansions)
          List all restrictions that exist directly on the given content.
 

Method Detail

getRestrictionsGroupByOperation

com.atlassian.util.concurrent.Promise<Map<OperationKey,ContentRestriction>> getRestrictionsGroupByOperation(ContentId target,
                                                                                                            Expansion... expansions)
                                                                                                            throws ServiceException
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 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.

Parameters:
target - the id of the content to look up permissions for
expansions - 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:
ServiceException
Since:
5.7

getRestrictionsForOperation

com.atlassian.util.concurrent.Promise<ContentRestriction> getRestrictionsForOperation(ContentId target,
                                                                                      OperationKey operationKey,
                                                                                      PageRequest pageRequest,
                                                                                      Expansion... expansions)
                                                                                      throws ServiceException
Retrieves all restrictions for given operation key on given content.

Parameters:
target - the id of the content to look up permissions for
operationKey - the operation key to look up restrictions for
pageRequest - pagination through the subjects contained within the ContentRestriction
expansions - 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:
ServiceException
Since:
5.7


Copyright © 2003–2015 Atlassian. All rights reserved.