* [ADF-3587] Fixed missing docs for accessor properties * [ADF-3587] Fixed badly formed doc comments with deprecated tag * [ADF-3587] Fixed linting issue with doc comment
7.1 KiB
Added, Status, Last reviewed
Added | Status | Last reviewed |
---|---|---|
v2.0.0 | Active | 2018-09-13 |
Document List service
Implements node operations used by the Document List component.
Class members
Methods
- copyNode(nodeId:
string
, targetParentId:string
):any
Copy a node to destination node- nodeId:
string
- The id of the node to be copied - targetParentId:
string
- The id of the folder where the node will be copied - Returns
any
- NodeEntry for the copied node
- nodeId:
- createFolder(name:
string
, parentId:string
):Observable
<
MinimalNodeEntity
>
Creates a new folder in the path.- name:
string
- Folder name - parentId:
string
- Parent folder ID - Returns
Observable
<
MinimalNodeEntity
>
- Details of the created folder node
- name:
- deleteNode(nodeId:
string
):Observable
<any>
Deletes a node.- nodeId:
string
- ID of the node to delete - Returns
Observable
<any>
- Empty response when the operation is complete
- nodeId:
- getDefaultMimeTypeIcon():
string
Gets a default icon for MIME types with no specific icon.- Returns
string
- Path to the icon file
- Returns
- getDocumentThumbnailUrl(node:
MinimalNodeEntity
):string
Get thumbnail URL for the given document node.- node:
MinimalNodeEntity
- Node to get URL for. - Returns
string
- Thumbnail URL string
- node:
- getFolder(folder:
string
, opts?:any
, includeFields:string[]
=[]
):Observable
<
NodePaging
>
Gets the folder node with the specified relative name path below the root node.- folder:
string
- Path to folder. - opts:
any
- (Optional) Options. - includeFields:
string[]
- Extra information to include (available options are "aspectNames", "isLink" and "association") - Returns
Observable
<
NodePaging
>
- Details of the folder
- folder:
- getFolderNode(nodeId:
string
, includeFields:string[]
=[]
):Observable
<
MinimalNodeEntryEntity
>
(Deprecated: 2.3.0) Gets a folder node via its node ID.- nodeId:
string
- ID of the folder node - includeFields:
string[]
- Extra information to include (available options are "aspectNames", "isLink" and "association") - Returns
Observable
<
MinimalNodeEntryEntity
>
- Details of the folder
- nodeId:
- getMimeTypeIcon(mimeType:
string
):string
Gets the icon that represents a MIME type.- mimeType:
string
- MIME type to get the icon for - Returns
string
- Path to the icon file
- mimeType:
- getNode(nodeId:
string
, includeFields:string[]
=[]
):Observable
<
NodeEntry
>
Gets a node via its node ID.- nodeId:
string
- ID of the target node - includeFields:
string[]
- Extra information to include (available options are "aspectNames", "isLink" and "association") - Returns
Observable
<
NodeEntry
>
- Details of the folder
- nodeId:
- hasPermission(node:
any
, permission:PermissionsEnum
|string
):boolean
(Deprecated: 2.3.0 - use the equivalent in the content service) Checks if a node has the specified permission.- node:
any
- Target node - permission:
PermissionsEnum
|string
- Permission level to query - Returns
boolean
- True if the node has the permission, false otherwise
- node:
- moveNode(nodeId:
string
, targetParentId:string
):any
Moves a node to destination node.- nodeId:
string
- The id of the node to be moved - targetParentId:
string
- The id of the folder where the node will be moved - Returns
any
- NodeEntry for the moved node
- nodeId:
Details
This service makes extensive use of the Alfresco JS API. In particular, see the Nodes API for further details of the types, options and the underlying REST architecture.
Also, the Document Library model in the ADF docs has more information about related classes.
Moving, copying and deleting nodes
Both moveNode
and copyNode
create a copy of the existing node under a new
parent, but moveNode
also deletes the original. The new node has the same
name as the original and if it is a folder then all its contents will be copied
in-place.
Use deleteNode
to move a node from its original location into the trash (from
where it can be restored if necessary). If the deleted node is a folder then its
child items will also be moved to the trash.
Folder operations
Use getFolderNode
to get a folder node by its node ID and getFolder
to access
the folder via its pathname from the root folder. Also, getFolder
allows you to
specify extra options in the opts
parameter; see the
getNodeChildren
method in the Alfresco JS API for more information about the available options.
Use createFolder
to add a new folder in a given parent folder node. You can
specify the well-known names "-my-" , "-shared-" and "-root-" as shortcuts for
the parentId
.
Permissions
The hasPermission
method reports whether or not the user has the specified permission for the
node. The Permissions enum contains the values DELETE, UPDATE, CREATE, UPDATEPERMISSIONS, NOT_DELETE, NOT_UPDATE, NOT_CREATE and NOT_UPDATEPERMISSIONS but you can also supply these
values via their string equivalents.