目录

Class info
public static final class File.Capabilities extends GenericJson
Class of the current user's permissions for the current file. Each permission corresponds to an action that can be taken by the user.

Public Constructor Summary

Constructor name
File.Capabilities()
Constructor for the File.Capabilities class.

Public Method Summary

Return typeMethod name
File.Capabilitiesclone()
Clones a File.Capabilities object.
BooleangetAddChildNodePermission()
Checks whether the current user can add children to the folder.
BooleangetWriterHasCopyPermission()
Checks whether the current user can change the value of writerHasCopyPermission for the file.
BooleangetCommentPermission()
Checks whether the current user can comment on the file.
BooleangetCopyPermission()
Checks whether the current user can copy the file.
BooleangetDeletePermission()
Checks whether the current user can delete the file.
BooleangetDeleteChildNodePermission()
Checks whether the current user can delete children from the folder.
BooleangetDownloadPermission()
Checks whether the current user can download the file.
BooleangetEditPermission()
Checks whether the current user can edit the file.
BooleangetListChildNodePermission()
Checks whether the current user can query children of the folder.
BooleangetReadHistoryVersionPermission()
Checks whether the current user can read revision records of the file.
BooleangetRemoveChildNodePermission()
Checks whether the current user can remove children from the folder.
BooleangetRenameFilePermission()
Checks whether the current user can rename the file.
BooleangetShareFilePermission()
Checks whether the current user can modify the sharing settings for the file.
BooleangetRecyclePermission()
Checks whether the current user can move the file to the recycle bin.
BooleangetRecyleChildNodePermission()
Checks whether the current user can move children of the folder to the recycle bin.
BooleangetUnrecyclePermission()
Checks whether the current user can restore the file from recycle bin.
File.Capabilitiesset (String fieldName, Object value)
Sets the given field value for the given field name.
File.CapabilitiessetAddChildNodePermission (Boolean addChildNodePermission)
Sets whether the current user can add children to the folder.
File.CapabilitiessetWriterHasCopyPermission (Boolean writerHasCopyPermission)
Sets whether the current user can change the value of writerHasCopyPermission for the file.
File.CapabilitiessetCommentPermission(Boolean commentPermission)
Sets whether the current user can comment on the file.
File.CapabilitiessetCopyPermission (Boolean copyPermission)
Sets whether the current user can copy the file.
File.CapabilitiessetDeletePermission (Boolean deletePermission)
Sets whether the current user can delete the file.
File.CapabilitiessetDeleteChildNodePermission (Boolean deleteChildNodePermission)
Sets whether the current user can delete children from the folder.
File.CapabilitiessetDownloadPermission (Boolean downloadPermission)
Sets whether the current user can download the file.
File.CapabilitiessetEditPermission (Boolean editPermission)
Sets whether the current user can edit the file.
File.CapabilitiessetRenameFilePermission (Boolean renameFilePermission)
Sets whether the current user can rename the file.
File.CapabilitiessetShareFilePermission (Boolean shareFilePermission)
Sets whether the current user can modify the sharing settings for the file.
File.CapabilitiessetRecyclePermission (Boolean recyclePermission)
Sets whether the current user can move the file to the recycle bin.
File.CapabilitiessetRecycleChildNodePermission (Boolean recycleChildNodePermission)
Sets whether the current user can move children of the folder to the recycle bin.
File.CapabilitiessetUnrecyclePermission (Boolean unrecyclePermission)
Sets whether the current user can restore the file from recycle bin.
BooleangetEditContentPermission()
Checks whether the current user can modify the content of the file.
File.CapabilitiessetEditContentPermission (Boolean editContentPermission)
Sets whether the current user can modify the content of the file.
File.CapabilitiessetListChildNodePermission(Boolean listChildNodePermission)
Sets whether the current user can query children of the folder.
File.CapabilitiessetRemoveChildNodePermission(Boolean removeChildNodePermission)
Sets whether the current user can remove children from the folder.
File.CapabilitiessetReadHistoryVersionPermission(Boolean readHistoryVersionPermission)
Sets whether the current user can read revision records of the file.

Public Constructors

constructor
File.Capabilities()
Constructs a File.Capabilities object.

Public Methods

Method
public File.Capabilities clone()
Clones a File.Capabilities object.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public Boolean getAddChildNodePermission()
Checks whether the current user can add children to the folder.

Return

typedesc
BooleanWhether the current user can add children to the folder.


Method
public Boolean getWriterHasCopyPermission()
Checks whether the current user can change the value of writerHasCopyPermission for the file.

Return

typedesc
BooleanWhether the current user can change the value of writerHasCopyPermission for the file. The writerHasCopyPermission specifies whether readers and commenters of a file have the copy, print, and download permissions for the file.


Method
public Boolean getCommentPermission()
Checks whether the current user can comment on the file.

Return

typedesc
BooleanWhether the current user can comment on the file.


Method
public Boolean getCopyPermission()
Checks whether the current user can copy the file.

Return

typedesc
BooleanWhether the current user can copy the file.


Method
public Boolean getDeletePermission()
Checks whether the current user can delete the file.

Return

typedesc
BooleanWhether the current user can delete the file.


Method
public Boolean getDeleteChildNodePermission()
Checks whether the current user can delete children from the folder.

Return

typedesc
BooleanWhether the current user can delete children from the folder.


Method
public Boolean getDownloadPermission()
Checks whether the current user can download the file.

Return

typedesc
BooleanWhether the current user can download the file.


Method
public Boolean getEditPermission()
Checks whether the current user can edit the file.

Return

typedesc
BooleanWhether the current user can edit the file.


Method
public Boolean getListChildNodePermission()
Checks whether the current user can query children of the folder.

Return

typedesc
BooleanWhether the current user can query children of the folder.

Method
public Boolean getReadHistoryVersionPermission()
Checks whether the current user can read revision records of the file.

Return

typedesc
BooleanWhether the current user can read revision records of the file.


Method
public Boolean getRemoveChildNodePermission()
Checks whether the current user can remove children from the folder.

Return

typedesc
BooleanWhether the current user can remove children from the folder.


Method
public Boolean getRenameFilePermission()
Checks whether the current user can rename the file.

Return

typedesc
BooleanWhether the current user can rename the file.


Method
public Boolean getShareFilePermission()
Checks whether the current user can modify the sharing settings for the file.

Return

typedesc
BooleanWhether the current user can modify the sharing settings for the file.


Method
public Boolean getRecyclePermission()
Checks whether the current user can move the file to the recycle bin.

Return

typedesc
BooleanWhether the current user can move the file to the recycle bin.


Method
public Boolean getRecycleChildNodePermission()
Checks whether the current user can move children of the folder to the recycle bin.

Return

typedesc
BooleanWhether the current user can move children of the folder to the recycle bin.


Method
public Boolean getUnrecyclePermission()
Checks whether the current user can restore the file from recycle bin.

Return

typedesc
BooleanWhether the current user can restore the file from recycle bin.


Method
public File.Capabilities set(String fieldName, Object value)
Sets the given field value for the given field name.

Parameters

Parameter nameParameter desc
fieldNameField name.
valueField value.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setAddChildNodePermission(Boolean addChildNodePermission)
Sets whether the current user can add children to the folder.

Parameters

Parameter nameParameter desc
addChildNodePermission

Indicates whether the current user can add children to the folder. The value is of the Boolean type.

true: The current user can add children to the folder. 

false: The current user cannot add children to the folder.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setWriterHasCopyPermission(Boolean writerHasCopyPermission)
Sets whether the current user can change the value of writerHasCopyPermission for the file.

Parameters

Parameter nameParameter desc
writerHasCopyPermission

Indicates whether the current user can change the value of writerHasCopyPermission for the file. The value is of the Boolean type. The writerHasCopyPermission specifies whether readers and commenters of a file have the copy, print, and download permissions for the file.

true: Readers and commenters of a file do not have the copy, print, and download permissions for the file. 

false: Readers and commenters of a file have the copy, print, and download permissions for the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setCommentPermission(Boolean commentPermission)
Sets whether the current user can comment on the file.

Parameters

Parameter nameParameter desc
commentPermission

Indicates whether the current user can comment on the file. The value is of the Boolean type.

true: The current user can comment on the file. 

false: The current user cannot comment on the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setCopyPermission(Boolean copyPermission)
Sets whether the current user can copy the file.

Parameters

Parameter nameParameter desc
copyPermission

Indicates whether the current user can copy the file. The value is of the Boolean type.

true: The current user can copy the file. 

false: The current user cannot copy the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setDeletePermission(Boolean deletePermission)
Sets whether the current user can delete the file.

Parameters

Parameter nameParameter desc
deletePermission

Indicates whether the current user can delete the file. The value is of the Boolean type.

true: The current user can delete the file. 

false: The current user cannot delete the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setDeleteChildNodePermission(Boolean deleteChildNodePermission)
Sets whether the current user can delete children from the folder.

Parameters

Parameter nameParameter desc
deleteChildNodePermissionIndicates whether the current user can delete children from the folder. The value is of the Boolean type. true: The current user can delete children from the folder. false: The current user cannot delete children from the folder.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setDownloadPermission(Boolean downloadPermission)
Sets whether the current user can download the file.

Parameters

Parameter nameParameter desc
downloadPermission

Indicates whether the current user can download the file. The value is of the Boolean type.

true: The current user can download the file. 

false: The current user cannot download the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method

public File.Capabilities setEditPermission(Boolean editPermission)

Sets whether the current user can edit the file.

Parameters

Parameter nameParameter desc
editPermission

Indicates whether the current user can edit the file. The value is of the Boolean type.

true: The current user can edit the file. 

false: The current user cannot edit the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setRenameFilePermission(Boolean renameFilePermission)
Sets whether the current user can rename the file.

Parameters

Parameter nameParameter desc
renameFilePermission

Indicates whether the current user can rename the file. The value is of the Boolean type.

true: The current user can rename the file. 

false: The current user cannot rename the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setShareFilePermission(Boolean shareFilePermission)
Sets whether the current user can modify the sharing settings for the file.

Parameters

Parameter nameParameter desc
shareFilePermission

Indicates whether the current user can modify the sharing settings for the file. The value is of the Boolean type.

true: The current user can modify the sharing settings for the file. 

false: The current user cannot modify the sharing settings for the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setRecyclePermission(Boolean recyclePermission)
Sets whether the current user can move the file to the recycle bin.

Parameters

Parameter nameParameter desc
recyclePermission

Indicates whether the current user can move the file to the recycle bin. The value is of the Boolean type. 

true: The current user can move the file to the recycle bin. 

false: The current user cannot move the file to the recycle bin.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method

public File.Capabilities setRecyleChildNodePermission(Boolean recycleChildNodePermission)

Sets whether the current user can move children of the folder to the recycle bin.

Parameters

Parameter nameParameter desc
recycleChildNodePermission

Indicates whether the current user can move children of the folder to the recycle bin. The value is of the Boolean type. 

true: The current user can move children of the folder recycle bin.  

false: The current user cannot move children of the folder to the recycle bin.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setUnrecyclePermission(Boolean unrecyclePermission)
Sets whether the current user can restore the file from recycle bin.

Parameters

Parameter nameParameter desc
unrecyclePermission

Indicates whether the current user can restore the file from recycle bin. The value is of the Boolean type.

true: The current user can restore the file from recycle bin. 

false: The current user cannot restore the file from recycle bin.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public Boolean getEditContentPermission()
Checks whether the current user can modify the content of the file.

Return

typedesc
Boolean

Whether the current user can modify the content of the file.

true: The current user can modify the content of the file. 

false: The current user cannot modify the content of the file.


Method
public File.Capabilities setEditContentPermission (Boolean editContentPermission)
Sets whether the current user can modify the content of the file.

Parameters

Parameter nameParameter desc
editContentPermission

Indicates whether the current user can modify the content of the file. The value is of the Boolean type.

true: The current user can modify the content of the file. 

false: The current user cannot modify the content of the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setListChildNodePermission(Boolean listChildNodePermission)
Sets whether the current user can query children of the folder.

Parameters

Parameter nameParameter desc
listChildNodePermissionIndicates whether the current user can query children of the folder.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setRemoveChildNodePermission(Boolean removeChildNodePermission)
Sets whether the current user can remove children from the folder.

Parameters

Parameter nameParameter desc
removeChildNodePermissionIndicates whether the current user can remove children from the folder.

Return

typedesc
File.CapabilitiesA File.Capabilities object.


Method
public File.Capabilities setReadHistoryVersionPermission(Boolean readHistoryVersionPermission)
Sets whether the current user can read revision records of the file.

Parameters

Parameter nameParameter desc
readHistoryVersionPermissionIndicates whether the current user can read revision records of the file.

Return

typedesc
File.CapabilitiesA File.Capabilities object.