public class MDataPermission
extends java.lang.Object
Constructor and Description |
---|
MDataPermission(net.maidsafe.api.AppHandle appHandle) |
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<java.lang.Long> |
getLength(NativeHandle permissionHandle)
Get the number of permissions for the Mutable Data
|
java.util.concurrent.CompletableFuture<PermissionSet> |
getPermissionForUser(NativeHandle permissionHandle,
NativeHandle signKey)
Returns the permission set for a user
|
java.util.concurrent.CompletableFuture |
insert(NativeHandle permissionHandle,
NativeHandle publicSignKey,
PermissionSet permissionSet)
Insert a new permission set for a user.
|
java.util.concurrent.CompletableFuture<java.util.List<UserPermissionSet>> |
listAll(NativeHandle permissionHandle)
Fetches a list of all associated user permission sets for a Mutable Data
|
java.util.concurrent.CompletableFuture<NativeHandle> |
newPermissionHandle()
Create a new Mutable Data permissions handle
|
public java.util.concurrent.CompletableFuture<NativeHandle> newPermissionHandle()
NativeHandle
public java.util.concurrent.CompletableFuture<java.lang.Long> getLength(NativeHandle permissionHandle)
permissionHandle
- Permissions handle as NativeHandle
public java.util.concurrent.CompletableFuture<PermissionSet> getPermissionForUser(NativeHandle permissionHandle, NativeHandle signKey)
permissionHandle
- Permission handle as NativeHandle
signKey
- Public sign key of the userPermissionSet
instancepublic java.util.concurrent.CompletableFuture<java.util.List<UserPermissionSet>> listAll(NativeHandle permissionHandle)
permissionHandle
- Permission handle as NativeHandle
UserPermissionSet
public java.util.concurrent.CompletableFuture insert(NativeHandle permissionHandle, NativeHandle publicSignKey, PermissionSet permissionSet)
permissionHandle
- Permission handle as NativeHandle
publicSignKey
- Public sign key for the user. To insert permissions for all users pass Constants.USER_ANYONEpermissionSet
- Permission set to be assigned