public class FolderPermissions extends Object
Constructor and Description |
---|
FolderPermissions(String userId,
long folderId) |
Modifier and Type | Method and Description |
---|---|
AccessPermission |
createPermission(AccessPermission accessPermission)
Creates a new access permission record to enable read or write privileges for a folder.
|
protected Permission |
createPermissionModel(AccessPermission accessPermission,
RemoteShareModel remoteShare) |
AccessPermission |
createRemotePermission(AccessPermission accessPermission)
Creates an access folder permission for a remote user
|
boolean |
disablePublicReadAccess() |
boolean |
enablePublicReadAccess() |
ArrayList<AccessPermission> |
get()
Retrieves list of available folder permissions (both local and remote)
|
protected RemoteClientModel |
getOrCreateRemoteClient(String remoteUserId,
RemotePartner remotePartner)
Checks if there is an existing client for the specified userId and remote partner.
|
boolean |
remove(long permissionId) |
protected boolean |
sendToken(AccessPermission accessPermission,
RemotePartner partner)
Send access permission to a remote partner with a "secret"
|
public FolderPermissions(String userId, long folderId)
public ArrayList<AccessPermission> get()
public AccessPermission createPermission(AccessPermission accessPermission)
accessPermission
- details about access permissions to createIllegalArgumentException
- if the accessPermission
object is nullPermissionException
- if specified user does not have write privileges
on specified folder.public boolean enablePublicReadAccess()
public boolean disablePublicReadAccess()
public AccessPermission createRemotePermission(AccessPermission accessPermission)
accessPermission
- access detailsIllegalArgumentException
- if the partner record cannot be retrievedprotected RemoteClientModel getOrCreateRemoteClient(String remoteUserId, RemotePartner remotePartner)
remoteUserId
- email address of remote userremotePartner
- remote partnerpublic boolean remove(long permissionId)
protected boolean sendToken(AccessPermission accessPermission, RemotePartner partner)
accessPermission
- permission details including secret tokenpartner
- remote ICE partner to send information toprotected Permission createPermissionModel(AccessPermission accessPermission, RemoteShareModel remoteShare)
Copyright © 2017. All rights reserved.