FileBrowserFolderLinkFile
Extends:
File browser folder link file item resource object representing a link file.
Method Summary
Public Methods | ||
public |
addGroupPermission(group_name: string, permission: string, timeout: number): Promise<LinkFileGroupPermission> Add a group permission to access the link file. |
|
public |
addUserPermission(username: string, permission: string, timeout: number): Promise<LinkFileUserPermission> Add a user permission to access the link file. |
|
public |
Make a DELETE request to delete this link file item resource through the REST API. |
|
public |
getFileBlob(timeout: number): Promise<Blob> Fetch the file blob associated to this file item from the REST API. |
|
public |
getGroupPermission(group_name: string, timeout: number): Promise<LinkFileGroupPermission|null> Get a link file group permission given the name of the group. |
|
public |
getGroupPermissions(searchParams: Object, timeout: number): Promise<LinkFileGroupPermissionList> Fetch a list of group permissions associated to this link file from the REST API. |
|
public |
Fetch the linked resource (file or folder) from the REST API. |
|
public |
getParentFolder(timeout: number): Promise<FileBrowserFolder> Fetch the parent folder of this link file from the REST API. |
|
public |
getUserPermission(username: string, timeout: number): Promise<LinkFileUserPermission|null> Get a link file user permission given the username of the user. |
|
public |
getUserPermissions(searchParams: Object, timeout: number): Promise<LinkFileUserPermissionList> Fetch a list of user permissions associated to this link file from the REST API. |
|
public |
makePublic(timeout: number): Promise<this> Make the link file public. |
|
public |
makeUnpublic(timeout: number): Promise<this> Make the link file unpublic. |
|
public |
Make a PUT request to modify this link file item resource through the REST API. |
Inherited Summary
From class Resource | ||
public static |
Helper method to make a deep copy clone of the passed object resource. |
|
public get |
Return true if the resource object contains any data. |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
Make a deep copy clone of this object resource. |
From class ItemResource | ||
public get |
Get the item's data object (REST API descriptors). |
|
public |
collection: * |
|
public |
Fetch this item resource from the REST API. |
|
public |
getPUTParameters(): string[] Get an array of parameter names that can be used as properties of the data object in PUT requests. |
|
private |
Internal helper method to make a DELETE request to this item resource through the REST API. |
|
private |
_getResource(linkRelation: string, ResourceClass: Object, searchParams: Object, timeout: number): Promise<ResourceClass> Internal method to fetch a related resource from the REST API that is referenced by a link relation within the item object. |
|
private |
Internal helper method to make a PUT request to this item resource through the REST API. |
Public Methods
public addGroupPermission(group_name: string, permission: string, timeout: number): Promise<LinkFileGroupPermission> source
Add a group permission to access the link file.
public addUserPermission(username: string, permission: string, timeout: number): Promise<LinkFileUserPermission> source
Add a user permission to access the link file.
public delete(timeout: number): Promise source
Make a DELETE request to delete this link file item resource through the REST API.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public getFileBlob(timeout: number): Promise<Blob> source
Fetch the file blob associated to this file item from the REST API.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public getGroupPermission(group_name: string, timeout: number): Promise<LinkFileGroupPermission|null> source
Get a link file group permission given the name of the group.
Return:
Promise<LinkFileGroupPermission|null> | JS Promise, resolves to a |
public getGroupPermissions(searchParams: Object, timeout: number): Promise<LinkFileGroupPermissionList> source
Fetch a list of group permissions associated to this link file from the REST API.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match link file group permission id exactly with this number |
searchParams.group_name | string |
|
match group name exactly with this string |
timeout | number |
|
request timeout |
Return:
Promise<LinkFileGroupPermissionList> | JS Promise, resolves to a |
public getLinkedResource(timeout: number): Promise<FileBrowserFolder|FileBrowserFolderFile|null> source
Fetch the linked resource (file or folder) from the REST API.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
Return:
Promise<FileBrowserFolder|FileBrowserFolderFile|null> | JS Promise, resolves to either a
|
public getParentFolder(timeout: number): Promise<FileBrowserFolder> source
Fetch the parent folder of this link file from the REST API.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public getUserPermission(username: string, timeout: number): Promise<LinkFileUserPermission|null> source
Get a link file user permission given the username of the user.
Return:
Promise<LinkFileUserPermission|null> | JS Promise, resolves to a |
public getUserPermissions(searchParams: Object, timeout: number): Promise<LinkFileUserPermissionList> source
Fetch a list of user permissions associated to this link file from the REST API.
Params:
Name | Type | Attribute | Description |
searchParams | Object |
|
search parameters object |
searchParams.limit | number |
|
page limit |
searchParams.offset | number |
|
page offset |
searchParams.id | number |
|
match link file user permission id exactly with this number |
searchParams.username | string |
|
match username exactly with this string |
timeout | number |
|
request timeout |
Return:
Promise<LinkFileUserPermissionList> | JS Promise, resolves to a |
public makePublic(timeout: number): Promise<this> source
Make the link file public.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public makeUnpublic(timeout: number): Promise<this> source
Make the link file unpublic.
Params:
Name | Type | Attribute | Description |
timeout | number |
|
request timeout |
public put(data: Object, timeout: number): Promise<this> source
Make a PUT request to modify this link file item resource through the REST API.
Params:
Name | Type | Attribute | Description |
data | Object | request JSON data object |
|
data.public | boolean |
|
public status of the link file |
data.new_link_file_path | string |
|
absolute path including file name where the link file will be uploaded on the storage service |
timeout | number |
|
request timeout |