mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2557] Updated docs with new props script (#3149)
* [ADF-2557] Updated docs for services with new props script * [ADF-2557] Updated service docs with new props script
This commit is contained in:
committed by
Eugenio Romano
parent
8769c257f8
commit
1d517d3a8a
@@ -75,6 +75,7 @@ export class DocumentListService {
|
||||
/**
|
||||
* Deletes a node.
|
||||
* @param nodeId ID of the node to delete
|
||||
* @returns Empty response when the operation is complete
|
||||
*/
|
||||
deleteNode(nodeId: string): Observable<any> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.deleteNode(nodeId));
|
||||
@@ -85,6 +86,7 @@ export class DocumentListService {
|
||||
*
|
||||
* @param nodeId The id of the node to be copied
|
||||
* @param targetParentId The id of the folder where the node will be copied
|
||||
* @returns NodeEntry for the copied node
|
||||
*/
|
||||
copyNode(nodeId: string, targetParentId: string) {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.copyNode(nodeId, { targetParentId }))
|
||||
@@ -96,6 +98,7 @@ export class DocumentListService {
|
||||
*
|
||||
* @param nodeId The id of the node to be moved
|
||||
* @param targetParentId The id of the folder where the node will be moved
|
||||
* @returns NodeEntry for the moved node
|
||||
*/
|
||||
moveNode(nodeId: string, targetParentId: string) {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.moveNode(nodeId, { targetParentId }))
|
||||
@@ -106,6 +109,7 @@ export class DocumentListService {
|
||||
* Create a new folder in the path.
|
||||
* @param name Folder name
|
||||
* @param parentId Parent folder ID
|
||||
* @returns Details of the created folder node
|
||||
*/
|
||||
createFolder(name: string, parentId: string): Observable<MinimalNodeEntity> {
|
||||
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, '/', parentId))
|
||||
@@ -116,6 +120,8 @@ export class DocumentListService {
|
||||
* Gets the folder node with the specified relative name path below the root node.
|
||||
* @param folder Path to folder.
|
||||
* @param opts Options.
|
||||
* @param includeFields Extra information to include (available options are "aspectNames", "isLink" and "association")
|
||||
* @returns Details of the folder
|
||||
*/
|
||||
getFolder(folder: string, opts?: any, includeFields: string[] = []): Observable<NodePaging> {
|
||||
return Observable.fromPromise(this.getNodesPromise(folder, opts, includeFields))
|
||||
@@ -126,6 +132,8 @@ export class DocumentListService {
|
||||
/**
|
||||
* Gets a folder node via its node ID.
|
||||
* @param nodeId ID of the folder node
|
||||
* @param includeFields Extra information to include (available options are "aspectNames", "isLink" and "association")
|
||||
* @returns Details of the folder
|
||||
*/
|
||||
getFolderNode(nodeId: string, includeFields: string[] = []): Promise<MinimalNodeEntryEntity> {
|
||||
|
||||
@@ -144,6 +152,7 @@ export class DocumentListService {
|
||||
/**
|
||||
* Get thumbnail URL for the given document node.
|
||||
* @param node Node to get URL for.
|
||||
* @returns Thumbnail URL string
|
||||
*/
|
||||
getDocumentThumbnailUrl(node: MinimalNodeEntity): string {
|
||||
return this.thumbnailService.getDocumentThumbnailUrl(node);
|
||||
@@ -152,6 +161,7 @@ export class DocumentListService {
|
||||
/**
|
||||
* Gets the icon that represents a MIME type.
|
||||
* @param mimeType MIME type to get the icon for
|
||||
* @returns Path to the icon file
|
||||
*/
|
||||
getMimeTypeIcon(mimeType: string): string {
|
||||
return this.thumbnailService.getMimeTypeIcon(mimeType);
|
||||
@@ -159,6 +169,7 @@ export class DocumentListService {
|
||||
|
||||
/**
|
||||
* Gets a default icon for MIME types with no specific icon.
|
||||
* @returns Path to the icon file
|
||||
*/
|
||||
getDefaultMimeTypeIcon(): string {
|
||||
return this.thumbnailService.getDefaultMimeTypeIcon();
|
||||
@@ -168,6 +179,7 @@ export class DocumentListService {
|
||||
* Checks if a node has the specified permission.
|
||||
* @param node Target node
|
||||
* @param permission Permission level to query
|
||||
* @returns True if the node has the permission, false otherwise
|
||||
*/
|
||||
hasPermission(node: any, permission: PermissionsEnum | string): boolean {
|
||||
return this.contentService.hasPermission(node, permission);
|
||||
|
Reference in New Issue
Block a user