mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDocs and methods and updated script (#2927)
This commit is contained in:
committed by
Eugenio Romano
parent
2bfed5818f
commit
76ad797488
@@ -4,17 +4,46 @@ Accesses app-generated data objects via URLs and file downloads.
|
||||
|
||||
## Methods
|
||||
|
||||
`downloadBlob(blob: Blob, fileName: string): void`<br/>
|
||||
Starts downloading the data in `blob` to a named file.
|
||||
|
||||
`downloadData(data: any, fileName: string): void`<br/>
|
||||
Starts downloading a data object to a named file.
|
||||
|
||||
`downloadJSON(json: any, fileName): void`<br/>
|
||||
Starts downloading of JSON data to a named file.
|
||||
|
||||
`createTrustedUrl(blob: Blob): string`<br/>
|
||||
Creates a trusted URL to access the data in `blob`.
|
||||
- `downloadBlob(blob: Blob, fileName: string)`
|
||||
Invokes content download for a Blob with a file name.
|
||||
- `blob` - Content to download.
|
||||
- `fileName` - Name of the resulting file.
|
||||
- `downloadData(data: any, fileName: string)`
|
||||
Invokes content download for a data array with a file name.
|
||||
- `data` - Data to download.
|
||||
- `fileName` - Name of the resulting file.
|
||||
- `downloadJSON(json: any, fileName)`
|
||||
Invokes content download for a JSON object with a file name.
|
||||
- `json` - JSON object to download.
|
||||
- `fileName` - Name of the resulting file.
|
||||
- `createTrustedUrl(blob: Blob): string`
|
||||
Creates a trusted object URL from the Blob. WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
|
||||
- `blob` - Data to wrap into object URL
|
||||
- `getDocumentThumbnailUrl(node: any, attachment?: boolean, ticket?: string): string`
|
||||
Get thumbnail URL for the given document node.
|
||||
- `node` - Node to get URL for.
|
||||
- `attachment` - (Optional) Retrieve content as an attachment for download
|
||||
- `ticket` - (Optional) Custom ticket to use for authentication
|
||||
- `getContentUrl(node: any, attachment?: boolean, ticket?: string): string`
|
||||
Get content URL for the given node.
|
||||
- `node` - nodeId or node to get URL for.
|
||||
- `attachment` - (Optional) Retrieve content as an attachment for download
|
||||
- `ticket` - (Optional) Custom ticket to use for authentication
|
||||
- `getNodeContent(nodeId: string): Observable<any>`
|
||||
Get content for the given node.
|
||||
- `nodeId` - ID of the target node
|
||||
- `createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`
|
||||
Create a folder
|
||||
- `relativePath` - Location to create the folder
|
||||
- `name` - Folder name
|
||||
- `parentId` - (Optional) Node ID of parent folder
|
||||
- `hasPermission(node: any, permission: PermissionsEnum | string): boolean`
|
||||
Check if the user has permissions on that node
|
||||
- `node` - Node to check allowableOperations
|
||||
- `permission` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
|
||||
- `hasAllowableOperations(node: any): boolean`
|
||||
Check if the node has the properties allowableOperations
|
||||
- `node` - Node to check allowableOperations
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -4,11 +4,18 @@ Stores key-value data items as browser cookies.
|
||||
|
||||
## Methods
|
||||
|
||||
`getItem(key: string): string | null` <br/>
|
||||
Gets an item identified by `key`.
|
||||
- `isEnabled(): boolean`
|
||||
Checks if cookies are enabled.
|
||||
|
||||
` setItem(key: string, data: string, expiration: Date | null, path: string | null): void ` <br/>
|
||||
Stores an item under `key`.
|
||||
- `getItem(key: string): string`
|
||||
Retrieves a cookie by its key.
|
||||
- `key` - Key to identify the cookie
|
||||
- `setItem(key: string, data: string, expiration: Date | null, path: string | null)`
|
||||
Set a cookie.
|
||||
- `key` - Key to identify the cookie
|
||||
- `data` - Data value to set for the cookie
|
||||
- `expiration` - Expiration date of the data
|
||||
- `path` - "Pathname" to store the cookie
|
||||
|
||||
## Details
|
||||
|
||||
@@ -21,10 +28,7 @@ Cookies have a storage size limit that varies between browsers but is often arou
|
||||
4KB. Consider using [web storage](storage.service.md) if you need to store data
|
||||
beyond this size.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
<!-- seealso start -->
|
||||
## See also
|
||||
|
||||
- [Content service](content.service.md)
|
||||
- [Storage service](storage.service.md)
|
||||
<!-- seealso end -->
|
||||
- [Content service](content.service.md)
|
||||
- [Storage service](storage.service.md)
|
||||
|
@@ -4,8 +4,9 @@ Gets a list of Content Services nodes currently in the trash.
|
||||
|
||||
## Methods
|
||||
|
||||
`getDeletedNodes(options?: Object): Observable<NodePaging>`<br/>
|
||||
Gets a list of nodes in the trash.
|
||||
- `getDeletedNodes(options?: Object): Observable<NodePaging>`
|
||||
Gets a list of nodes in the trash.
|
||||
- `options` - (Optional) Options for JSAPI call
|
||||
|
||||
## Details
|
||||
|
||||
@@ -15,13 +16,7 @@ more information about this class). The format of the `options` parameter is
|
||||
described in the [getDeletedNodes](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodesApi.md#getDeletedNodes)
|
||||
page of the Alfresco JS API docs.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
<!-- seealso start -->
|
||||
## See also
|
||||
|
||||
- [Nodes api service](nodes-api.service.md)
|
||||
- [Node service](node.service.md)
|
||||
<!-- seealso end -->
|
||||
|
||||
|
||||
|
||||
- [Nodes api service](nodes-api.service.md)
|
||||
- [Node service](node.service.md)
|
||||
|
@@ -4,11 +4,11 @@ Gets version and license information for Process Services and Content Services.
|
||||
|
||||
## Methods
|
||||
|
||||
`public getEcmProductInfo(): Observable<EcmProductVersionModel>`<br/>
|
||||
Gets product information for Content Services.
|
||||
- `getEcmProductInfo(): any`
|
||||
Gets product information for Content Services.
|
||||
|
||||
`public getBpmProductInfo(): Observable<BpmProductVersionModel>`<br/>
|
||||
Gets product information for Process Services.
|
||||
- `getBpmProductInfo(): any`
|
||||
Gets product information for Process Services.
|
||||
|
||||
## Details
|
||||
|
||||
@@ -18,12 +18,6 @@ See the
|
||||
[Alfresco JS API docs](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-discovery-rest-api)
|
||||
to learn more about the REST API used by this service.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
<!-- seealso start -->
|
||||
## See also
|
||||
|
||||
- [Product version model](product-version.model.md)
|
||||
<!-- seealso end -->
|
||||
|
||||
|
||||
|
||||
- [Product version model](product-version.model.md)
|
||||
|
@@ -2,6 +2,19 @@
|
||||
|
||||
Implements the document menu actions for the Document List component.
|
||||
|
||||
## Methods
|
||||
|
||||
- `getHandler(key: string): ContentActionHandler`
|
||||
Gets the handler for an action.
|
||||
- `key` - Identifier of the action
|
||||
- `setHandler(key: string, handler: ContentActionHandler): boolean`
|
||||
Sets a new handler for an action.
|
||||
- `key` - Identifier of the action
|
||||
- `handler` - Handler for the action
|
||||
- `canExecuteAction(obj: any): boolean`
|
||||
Checks if actions can be executed for an item.
|
||||
- `obj` - Item to receive an action
|
||||
|
||||
## Details
|
||||
|
||||
This service implements the built-in actions that can be applied to a document
|
||||
@@ -72,10 +85,7 @@ export class MyView {
|
||||
You will probably want to set up all your custom actions at the application root level or
|
||||
with a custom application service.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
<!-- seealso start -->
|
||||
## See also
|
||||
|
||||
- [Content action component](content-action.component.md)
|
||||
- [Folder actions service](folder-actions.service.md)
|
||||
<!-- seealso end -->
|
||||
- [Content action component](content-action.component.md)
|
||||
- [Folder actions service](folder-actions.service.md)
|
||||
|
@@ -4,35 +4,41 @@ Implements node operations used by the Document List component.
|
||||
|
||||
## Methods
|
||||
|
||||
`deleteNode(nodeId: string): Observable<any>`<br/>
|
||||
Deletes a node.
|
||||
- `deleteNode(nodeId: string): Observable<any>`
|
||||
Deletes a node.
|
||||
- `nodeId` - ID of the node to delete
|
||||
- `copyNode(nodeId: string, targetParentId: string): any`
|
||||
Copy a node to destination node
|
||||
- `nodeId` - The id of the node to be copied
|
||||
- `targetParentId` - The id of the folder where the node will be copied
|
||||
- `moveNode(nodeId: string, targetParentId: string): any`
|
||||
Move a node to destination node
|
||||
- `nodeId` - The id of the node to be moved
|
||||
- `targetParentId` - The id of the folder where the node will be moved
|
||||
- `createFolder(name: string, parentId: string): Observable<MinimalNodeEntity>`
|
||||
Create a new folder in the path.
|
||||
- `name` - Folder name
|
||||
- `parentId` - Parent folder ID
|
||||
- `getFolder(folder: string, opts?: any): any`
|
||||
Gets the folder node with the specified relative name path below the root node.
|
||||
- `folder` - Path to folder.
|
||||
- `opts` - (Optional) Options.
|
||||
- `getFolderNode(nodeId: string): Promise<MinimalNodeEntryEntity>`
|
||||
Gets a folder node via its node ID.
|
||||
- `nodeId` - ID of the folder node
|
||||
- `getDocumentThumbnailUrl(node: MinimalNodeEntity): any`
|
||||
Get thumbnail URL for the given document node.
|
||||
- `node` - Node to get URL for.
|
||||
- `getMimeTypeIcon(mimeType: string): string`
|
||||
Gets the icon that represents a MIME type.
|
||||
- `mimeType` - MIME type to get the icon for
|
||||
- `getDefaultMimeTypeIcon(): string`
|
||||
Gets a default icon for MIME types with no specific icon.
|
||||
|
||||
`copyNode(nodeId: string, targetParentId: string)`<br/>
|
||||
Places a copy of an existing node under a new parent node.
|
||||
|
||||
`moveNode(nodeId: string, targetParentId: string)`<br/>
|
||||
hasPermission(node: any, permission: PermissionsEnum|string): boolean.
|
||||
|
||||
`createFolder(name: string, parentId: string): Observable<MinimalNodeEntity>`<br/>
|
||||
Creates a folder.
|
||||
|
||||
`getFolder(folder: string, opts?: any): Observable<NodePaging>`<br/>
|
||||
Gets a folder node via its pathname from root.
|
||||
|
||||
`getFolderNode(nodeId: string): Promise<MinimalNodeEntryEntity>`<br/>
|
||||
Gets a folder node via its node ID.
|
||||
|
||||
`getDocumentThumbnailUrl(node: MinimalNodeEntity): string`<br/>
|
||||
Gets the thumbnail URL for a document node.
|
||||
|
||||
`getMimeTypeIcon(mimeType: string): string`<br/>
|
||||
Gets the icon that represents a MIME type.
|
||||
|
||||
`getDefaultMimeTypeIcon(): string`<br/>
|
||||
Gets a default icon for MIME types with no specific icon.
|
||||
|
||||
`hasPermission(node: any, permission: PermissionsEnum|string): boolean`<br/>
|
||||
Gets a folder node via its pathname from root.
|
||||
- `hasPermission(node: any, permission: PermissionsEnum|string): boolean`
|
||||
Checks if a node has the specified permission.
|
||||
- `node` - Target node
|
||||
- `permission` - Permission level to query
|
||||
|
||||
## Details
|
||||
|
||||
@@ -73,12 +79,6 @@ The `hasPermission` method reports whether or not the user has the specified per
|
||||
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.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
<!-- seealso start -->
|
||||
## See also
|
||||
|
||||
- [Document list component](document-list.component.md)
|
||||
<!-- seealso end -->
|
||||
|
||||
|
||||
|
||||
- [Document list component](document-list.component.md)
|
||||
|
@@ -4,14 +4,15 @@ Gets information about a Content Services user.
|
||||
|
||||
## Methods
|
||||
|
||||
`getUserInfo(userName: string): Observable<EcmUserModel>`<br/>
|
||||
Gets information about a user identified by their username.
|
||||
- `getUserInfo(userName: string): Observable<EcmUserModel>`
|
||||
Gets information about a user identified by their username.
|
||||
- `userName` - Target username
|
||||
- `getCurrentUserInfo(): Observable<EcmUserModel>`
|
||||
Gets information about the user who is currently logged-in.
|
||||
|
||||
`getCurrentUserInfo(): Observable<EcmUserModel>`<br/>
|
||||
Gets information about the user who is currently logged-in.
|
||||
|
||||
`getUserProfileImage(avatarId: string)`<br/>
|
||||
Returns a profile image as a URL.
|
||||
- `getUserProfileImage(avatarId: string): string`
|
||||
Returns a profile image as a URL.
|
||||
- `avatarId` - Target avatar
|
||||
|
||||
## Details
|
||||
|
||||
|
Reference in New Issue
Block a user