目录

File.Capabilities

Class Info

public static final class File.Capabilities extends GenericJson

Class of the current user's permissions for the file. Each permission corresponds to an action that can be taken by the user.

Public Constructor Summary

Constructor Name

File.Capabilities()

Constructs a File.Capabilities object.

Public Method Summary

Qualifier and Type

Method Name and Description

File.Capabilities

clone()

Clones a File.Capabilities object.

Boolean

getAddChildNodePermission()

Checks whether the current user has permission to add children to the folder.

Boolean

getWriterHasCopyPermission()

Checks whether the current user has permission to change the value of copyRequiresWriterPermission for the file.

Boolean

getCommentPermission()

Checks whether the current user has permission to comment on the file.

Boolean

getCopyPermission()

Checks whether the current user has permission to copy the file.

Boolean

getDeletePermission()

Checks whether the current user has permission to delete the file.

Boolean

getDeleteChildNodePermission()

Checks whether the current user has permission to delete children from the folder.

Boolean

getDownloadPermission()

Checks whether the current user has permission to download the file.

Boolean

getEditPermission()

Checks whether the current user has permission to edit the file.

Boolean

getListChildNodePermission()

Checks whether the current user has permission to query children of the folder.

Boolean

getReadHistoryVersionPermission()

Checks whether the current user has permission to read the historical versions of the file.

Boolean

getRemoveChildNodePermission()

Checks whether the current user has permission to remove children from the folder.

Boolean

getRenameFilePermission()

Checks whether the current user has permission to rename the file.

Boolean

getShareFilePermission()

Checks whether the current user has permission to modify the sharing settings for the file.

Boolean

getRecyclePermission()

Checks whether the current user has permission to move the file to the recycle bin.

Boolean

getRecycleChildNodePermission()

Checks whether the current user has permission to move children of the folder to the recycle bin.

Boolean

getUnrecyclePermission()

Checks whether the current user has permission to restore the file from the recycle bin.

File.Capabilities

set(String fieldName, Object value)

Sets a custom attribute and its value.

File.Capabilities

setAddChildNodePermission(Boolean addChildNodePermission)

Sets whether the current user has permission to add children to the folder.

File.Capabilities

setWriterHasCopyPermission(Boolean writerHasCopyPermission)

Sets whether the current user has permission to change the value of writerHasCopyPermission for the file.

File.Capabilities

setCommentPermission(Boolean commentPermission)

Sets whether the current user has permission to comment on the file.

File.Capabilities

setCopyPermission(Boolean copyPermission)

Sets whether the current user has permission to copy the file.

File.Capabilities

setDeletePermission(Boolean deletePermission)

Sets whether the current user has permission to delete the file.

File.Capabilities

setDeleteChildNodePermission(Boolean deleteChildNodePermission)

Sets whether the current user has permission to delete children from the folder.

File.Capabilities

setDownloadPermission(Boolean downloadPermission)

Sets whether the current user has permission to download the file.

File.Capabilities

setEditPermission(Boolean editPermission)

Sets whether the current user has permission to edit the file.

File.Capabilities

setRenameFilePermission(Boolean renameFilePermission)

Sets whether the current user has permission to rename the file.

File.Capabilities

setShareFilePermission(Boolean shareFilePermission)

Sets whether the current user has permission to modify the sharing settings for the file.

File.Capabilities

setRecyclePermission(Boolean recyclePermission)

Sets whether the current user has permission to move the file to the recycle bin.

File.Capabilities

setRecycleChildNodePermission(Boolean recycleChildNodePermission)

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

File.Capabilities

setUnrecyclePermission(Boolean unrecyclePermission)

Sets whether the current user has permission to restore the file from the recycle bin.

Boolean

getEditContentPermission()

Checks whether the current user has permission to modify the content of the file.

File.Capabilities

setEditContentPermission(Boolean editContentPermission)

Sets whether the current user has permission to modify the content of the file.

File.Capabilities

setListChildNodePermission(Boolean listChildNodePermission)

Sets whether the current user has permission to query children of the folder.

File.Capabilities

setRemoveChildNodePermission(Boolean removeChildNodePermission)

Sets whether the current user has permission to remove children from the folder.

File.Capabilities

setReadHistoryVersionPermission(Boolean readHistoryVersionPermission)

Sets whether the current user has permission to read the historical versions of the file.

Public Constructors

[h2]Capabilities

Constructor

File.Capabilities()

Constructs a File.Capabilities object.

Public Methods

[h2]clone

Method

public File.Capabilities clone()

Clones a File.Capabilities object.

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]getAddChildNodePermission

Method

public Boolean getAddChildNodePermission()

Checks whether the current user has permission to add children to the folder.

Returns

Type

Description

Boolean

Whether the current user has permission to add children to the folder.

[h2]getWriterHasCopyPermission

Method

public Boolean getWriterHasCopyPermission()

Checks whether the current user has permission to change the value of copyRequiresWriterPermission for the file.

Returns

Type

Description

Boolean

Whether the current user has permission to change the value of writerHasCopyPermission for the file. The writerHasCopyPermission specifies whether readers and commenters of the file have the copy, print, and download permissions for the file.

[h2]getCommentPermission

Method

public Boolean getCommentPermission()

Checks whether the current user has permission to comment on the file.

Returns

Type

Description

Boolean

Whether the current user has permission to comment on the file.

[h2]getCopyPermission

Method

public Boolean getCopyPermission()

Checks whether the current user has permission to copy the file.

Returns

Type

Description

Boolean

Whether the current user has permission to copy the file.

[h2]getDeletePermission

Method

public Boolean getDeletePermission()

Checks whether the current user has permission to delete the file.

Returns

Type

Description

Boolean

Whether the current user has permission to delete the file.

[h2]getDeleteChildNodePermission

Method

public Boolean getDeleteChildNodePermission()

Checks whether the current user has permission to delete children from the folder. (This API is reserved.)

Returns

Type

Description

Boolean

Whether the current user has permission to delete children from the folder.

[h2]getDownloadPermission

Method

public Boolean getDownloadPermission()

Checks whether the current user has permission to download the file.

Returns

Type

Description

Boolean

Whether the current user has permission to download the file.

[h2]getEditPermission

Method

public Boolean getEditPermission()

Checks whether the current user has permission to edit the file.

Returns

Type

Description

Boolean

Whether the current user has permission to edit the file.

[h2]getListChildNodePermission

Method

public Boolean getListChildNodePermission()

Checks whether the current user has permission to query children of the folder.

Returns

Type

Description

Boolean

Whether the current user has permission to query children of the folder.

[h2]getReadHistoryVersionPermission

Method

public Boolean getReadHistoryVersionPermission()

Checks whether the current user has permission to read the historical versions of the file.

Returns

Type

Description

Boolean

Whether the current user has permission to read the historical versions of the file.

[h2]getRemoveChildNodePermission

Method

public Boolean getRemoveChildNodePermission()

Checks whether the current user has permission to remove children from the folder.

Returns

Type

Description

Boolean

Whether the current user has permission to remove children from the folder.

[h2]getRenameFilePermission

Method

public Boolean getRenameFilePermission()

Checks whether the current user has permission to rename the file.

Returns

Type

Description

Boolean

Whether the current user has permission to rename the file.

[h2]getShareFilePermission

Method

public Boolean getShareFilePermission()

Checks whether the current user has permission to modify the sharing settings for the file.

Returns

Type

Description

Boolean

Whether the current user has permission to modify the sharing settings for the file.

[h2]getRecyclePermission

Method

public Boolean getRecyclePermission()

Checks whether the current user has permission to move the file to the recycle bin.

Returns

Type

Description

Boolean

Whether the current user has permission to move the file to the recycle bin.

[h2]getRecycleChildNodePermission

Method

public Boolean getRecycleChildNodePermission()

Checks whether the current user has permission to move children of the folder to the recycle bin. (This API is reserved.)

Returns

Type

Description

Boolean

Whether the current user has permission to move children of the folder to the recycle bin.

[h2]getUnrecyclePermission

Method

public Boolean getUnrecyclePermission()

Checks whether the current user has permission to restore the file from the recycle bin.

Returns

Type

Description

Boolean

Whether the current user has permission to restore the file from the recycle bin.

[h2]set

Method

public File.Capabilities set(String fieldName, Object value)

Sets a custom attribute and its value.

Parameters

Name

Description

fieldName

Attribute name.

value

Attribute value.

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setAddChildNodePermission

Method

public File.Capabilities setAddChildNodePermission(Boolean addChildNodePermission)

Sets whether the current user has permission to add children to the folder.

Parameters

Name

Description

addChildNodePermission

Indicates whether the current user has permission to add children to the folder. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setWriterHasCopyPermission

Method

public File.Capabilities setWriterHasCopyPermission(Boolean writerHasCopyPermission)

Sets whether the current user has permission to change the value of writerHasCopyPermission for the file.

Parameters

Name

Description

writerHasCopyPermission

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

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setCommentPermission

Method

public File.Capabilities setCommentPermission(Boolean commentPermission)

Sets whether the current user has permission to comment on the file.

Parameters

Name

Description

commentPermission

Indicates whether the current user has permission to comment on the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setCopyPermission

Method

public File.Capabilities setCopyPermission(Boolean copyPermission)

Sets whether the current user has permission to copy the file.

Parameters

Name

Description

copyPermission

Indicates whether the current user has permission to copy the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setDeletePermission

Method

public File.Capabilities setDeletePermission(Boolean deletePermission)

Sets whether the current user has permission to delete the file.

Parameters

Name

Description

deletePermission

Indicates whether the current user has permission to delete the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setDeleteChildNodePermission

Method

public File.Capabilities setDeleteChildNodePermission(Boolean deleteChildNodePermission)

Sets whether the current user has permission to delete children from the folder. (This API is reserved.)

Parameters

Name

Description

deleteChildNodePermission

Indicates whether the current user has permission to delete children from the folder. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setDownloadPermission

Method

public File.Capabilities setDownloadPermission(Boolean downloadPermission)

Sets whether the current user has permission to download the file.

Parameters

Name

Description

downloadPermission

Indicates whether the current user has permission to download the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setEditPermission

Method

public File.Capabilities setEditPermission(Boolean editPermission)

Sets whether the current user has permission to edit the file.

Parameters

Name

Description

editPermission

Indicates whether the current user has permission to edit the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setRenameFilePermission

Method

public File.Capabilities setRenameFilePermission(Boolean renameFilePermission)

Sets whether the current user has permission to rename the file.

Parameters

Name

Description

renameFilePermission

Indicates whether the current user has permission to rename the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setShareFilePermission

Method

public File.Capabilities setShareFilePermission(Boolean shareFilePermission)

Sets whether the current user has permission to modify the sharing settings for the file.

Parameters

Name

Description

shareFilePermission

Indicates whether the current user has permission to modify the sharing settings for the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setRecyclePermission

Method

public File.Capabilities setRecyclePermission(Boolean recyclePermission)

Sets whether the current user has permission to move the file to the recycle bin.

Parameters

Name

Description

recyclePermission

Indicates whether the current user has permission to move the file to the recycle bin. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setRecycleChildNodePermission

Method

public File.Capabilities setRecycleChildNodePermission(Boolean recycleChildNodePermission)

Sets whether the current user has permission to move children of the folder to the recycle bin. (This API is reserved.)

Parameters

Name

Description

recycleChildNodePermission

Indicates whether the current user has permission to move children of the folder to the recycle bin. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setUnrecyclePermission

Method

public File.Capabilities setUnrecyclePermission(Boolean unrecyclePermission)

Sets whether the current user has permission to restore the file from the recycle bin.

Parameters

Name

Description

unrecyclePermission

Indicates whether the current user has permission to restore the file from the recycle bin. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]getEditContentPermission

Method

public Boolean getEditContentPermission()

Checks whether the current user has permission to modify the content of the file.

Returns

Type

Description

Boolean

Whether the current user has permission to modify the content of the file.

  • true: yes
  • false: no

[h2]setEditContentPermission

Method

public File.Capabilities setEditContentPermission(Boolean editContentPermission)

Sets whether the current user has permission to modify the content of the file.

Parameters

Name

Description

editContentPermission

Indicates whether the current user has permission to modify the content of the file. The value is a Boolean value.

  • true: yes
  • false: no

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setListChildNodePermission

Method

public File.Capabilities setListChildNodePermission(Boolean listChildNodePermission)

Sets whether the current user has permission to query children of the folder.

Parameters

Name

Description

listChildNodePermission

Indicates whether the current user has permission to query children of the folder.

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setRemoveChildNodePermission

Method

public File.Capabilities setRemoveChildNodePermission(Boolean removeChildNodePermission)

Sets whether the current user has permission to remove children from the folder.

Parameters

Name

Description

removeChildNodePermission

Indicates whether the current user has permission to remove children from the folder.

Returns

Type

Description

File.Capabilities

A File.Capabilities object.

[h2]setReadHistoryVersionPermission

Method

public File.Capabilities setReadHistoryVersionPermission(Boolean readHistoryVersionPermission)

Sets whether the current user has permission to read the historical versions of the file.

Parameters

Name

Description

readHistoryVersionPermission

Indicates whether the current user has permission to read the historical versions of the file.

Returns

Type

Description

File.Capabilities

A File.Capabilities object.