com.atlassian.confluence.rest.client
Class RemoteContentRestrictionServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.rest.client.AbstractRemoteService<ContentRestrictionService>
      extended by com.atlassian.confluence.rest.client.RemoteContentRestrictionServiceImpl
All Implemented Interfaces:
RemoteContentRestrictionService

public class RemoteContentRestrictionServiceImpl
extends AbstractRemoteService<ContentRestrictionService>
implements RemoteContentRestrictionService


Constructor Summary
RemoteContentRestrictionServiceImpl(AuthenticatedWebResourceProvider provider, com.google.common.util.concurrent.ListeningExecutorService executor)
           
 
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.
 
Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteFuture, deleteFuture, getFuture, getFutureGenericCollection, getFutureMap, getFutureMapOfPageResponses, getFutureOption, getFuturePageResponseList, newExperimentalRestWebResource, newRestWebResource, postFuture, postFuture, postFuture, postFutureToPageResponse, putFuture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteContentRestrictionServiceImpl

public RemoteContentRestrictionServiceImpl(AuthenticatedWebResourceProvider provider,
                                           com.google.common.util.concurrent.ListeningExecutorService executor)
Method Detail

getRestrictionsGroupByOperation

public com.atlassian.util.concurrent.Promise<Map<OperationKey,ContentRestriction>> getRestrictionsGroupByOperation(ContentId target,
                                                                                                                   Expansion... expansions)
                                                                                                            throws ServiceException
Description copied from interface: RemoteContentRestrictionService
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 RemoteContentRestrictionService.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 RemoteContentRestrictionService
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

getRestrictionsForOperation

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

Specified by:
getRestrictionsForOperation in interface RemoteContentRestrictionService
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


Copyright © 2003–2015 Atlassian. All rights reserved.