Class RemoteSpacePermissionServiceImpl
java.lang.Object
com.atlassian.confluence.rest.client.AbstractRemoteService<SpacePermissionService>
com.atlassian.confluence.rest.client.RemoteSpacePermissionServiceImpl
- All Implemented Interfaces:
RemoteSpacePermissionService
public class RemoteSpacePermissionServiceImpl
extends AbstractRemoteService<SpacePermissionService>
implements RemoteSpacePermissionService
-
Field Summary
Fields inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
provider -
Constructor Summary
ConstructorsConstructorDescriptionRemoteSpacePermissionServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptiongetAllPermissions(String spaceKey) Get all space permissionsgetPermissionsGrantedToAnonymousUsers(String spaceKey) Get the permissions granted to an anonymous users in the given space.getPermissionsGrantedToGroup(String spaceKey, String groupName) Get the permissions granted to a group in the given space.getPermissionsGrantedToUser(String spaceKey, String userKey) Get the permissions granted to a user in the given space.grantPermissionsToAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Grants permissions to an anonymous user in the given space.grantPermissionsToGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Grants permissions to a user in the given space.grantPermissionsToUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Grants permissions to a user in the given space.removePermissionsFromAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Remove space permissions from an anonymous user in the given space.removePermissionsFromGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Remove space permissions from a group in the given space.removePermissionsFromUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Remove space permissions from a user in the given space.setPermissions(String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) Sets permissions to multiple users/groups in the given space.Methods inherited from class com.atlassian.confluence.rest.client.AbstractRemoteService
addExpansions, addPageRequest, addPageRequestParams, deleteCompletionStage, deleteCompletionStage, getCompletionStage, getCompletionStageGenericCollection, getCompletionStageMap, getCompletionStageMapOfGenericListResponse, getCompletionStageMapOfPageResponses, getCompletionStageOptional, getCompletionStagePageResponseList, getCompletionStageSearchPageResponseList, getExecutor, newBackdoorWebTarget, newExperimentalRestWebTarget, newWebTarget, postCompletionStage, postCompletionStage, postCompletionStage, postCompletionStageToPageResponse, postVoidCompletionStage, putCompletionStage, putVoidCompletionStage
-
Constructor Details
-
RemoteSpacePermissionServiceImpl
public RemoteSpacePermissionServiceImpl(AuthenticatedWebResourceProvider provider, ExecutorService executor)
-
-
Method Details
-
getPermissionsGrantedToUser
public CompletionStage<Iterable<SpacePermission>> getPermissionsGrantedToUser(String spaceKey, String userKey) Description copied from interface:RemoteSpacePermissionServiceGet the permissions granted to a user in the given space.
- Specified by:
getPermissionsGrantedToUserin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the spaceuserKey- the user key- Returns:
- list of space permissions granted to the user
-
getPermissionsGrantedToAnonymousUsers
public CompletionStage<Iterable<SpacePermission>> getPermissionsGrantedToAnonymousUsers(String spaceKey) Description copied from interface:RemoteSpacePermissionServiceGet the permissions granted to an anonymous users in the given space.
- Specified by:
getPermissionsGrantedToAnonymousUsersin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space- Returns:
- list of space permissions granted to the user
-
getPermissionsGrantedToGroup
public CompletionStage<Iterable<SpacePermission>> getPermissionsGrantedToGroup(String spaceKey, String groupName) Description copied from interface:RemoteSpacePermissionServiceGet the permissions granted to a group in the given space.
- Specified by:
getPermissionsGrantedToGroupin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the spacegroupName- the name of the group- Returns:
- list of space permissions granted to the group
-
getAllPermissions
Description copied from interface:RemoteSpacePermissionServiceGet all space permissions
- Specified by:
getAllPermissionsin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space- Returns:
- list of permissions granted to users and groups in the particular space
-
grantPermissionsToUser
public CompletionStage<Void> grantPermissionsToUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Description copied from interface:RemoteSpacePermissionServiceGrants permissions to a user in the given space.
- Specified by:
grantPermissionsToUserin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space to updateuserKey- the user keypermissions- the permissions being granted
-
grantPermissionsToAnonymousUser
public CompletionStage<Void> grantPermissionsToAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Description copied from interface:RemoteSpacePermissionServiceGrants permissions to an anonymous user in the given space.
- Specified by:
grantPermissionsToAnonymousUserin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space to updatepermissions- the permissions being granted
-
grantPermissionsToGroup
public CompletionStage<Void> grantPermissionsToGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Description copied from interface:RemoteSpacePermissionServiceGrants permissions to a user in the given space.
- Specified by:
grantPermissionsToGroupin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space to updategroupName- the name of the grouppermissions- the permissions being granted
-
removePermissionsFromUser
public CompletionStage<Void> removePermissionsFromUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Description copied from interface:RemoteSpacePermissionServiceRemove space permissions from a user in the given space.
- Specified by:
removePermissionsFromUserin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space to updateuserKey- the user keypermissions- the permissions being revoked
-
removePermissionsFromAnonymousUser
public CompletionStage<Void> removePermissionsFromAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Description copied from interface:RemoteSpacePermissionServiceRemove space permissions from an anonymous user in the given space.
- Specified by:
removePermissionsFromAnonymousUserin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space to updatepermissions- the permissions being revoked
-
removePermissionsFromGroup
public CompletionStage<Void> removePermissionsFromGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Description copied from interface:RemoteSpacePermissionServiceRemove space permissions from a group in the given space.
- Specified by:
removePermissionsFromGroupin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space to updategroupName- the name of the grouppermissions- the permissions being revoked
-
setPermissions
public CompletionStage<Void> setPermissions(String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) Description copied from interface:RemoteSpacePermissionServiceSets permissions to multiple users/groups in the given space. Request should contain all permissions that user/group/anonymous user will have in a given space. If permission is absent in the request, but was granted before, it will be revoked. If empty list of permissions passed to user/group/anonymous user, then all their existing permissions will be revoked. If user/group/anonymous user not mentioned in the request, their permissions will not be revoked. Maximum 40 different users/groups/anonymous user could be passed in the request.- Specified by:
setPermissionsin interfaceRemoteSpacePermissionService- Parameters:
spaceKey- the key of the space to updatespacePermissionsForSubjects- the name of the group
-