[ADF-2905] Updated JSDocs for content services (#3262)

* [ADF-2905] Updated JSDocs for content services

* [ADF-2905] Updated JSDocs for content services

* [ADF-2911] Improved error message handling in doc tools (#3267)

* [ADF-2772] Sidenav Layout - UX review (#3264)

* Add border-right in mat-sidenav

* workaround for enum issue in js-api

* fix the AoT buid error

* fix AoT build error

* fix export problem for AoT

* [ADF-2905] Updated JSDocs for content services

* [ADF-2905] Updated JSDocs for content services
This commit is contained in:
Andy Stark
2018-05-04 11:11:11 +01:00
committed by Eugenio Romano
parent 7f020348ad
commit b393708514
16 changed files with 233 additions and 144 deletions

View File

@@ -26,12 +26,12 @@ Displays and edits metadata related to a node.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| displayEmpty | `boolean` | false | |
| editable | `boolean` | false | |
| expanded | `boolean` | false | |
| multi | `boolean` | false | |
| node | `MinimalNodeEntryEntity` | | |
| preset | `string` | | |
| displayEmpty | `boolean` | false | Toggles whether to display empty values in the card view |
| editable | `boolean` | false | Toggles whether the edit button should be shown |
| expanded | `boolean` | false | Toggles between expanded (ie, full information) and collapsed (ie, reduced information) in the display |
| multi | `boolean` | false | The multi parameter of the underlying material expansion panel |
| node | `MinimalNodeEntryEntity` | | (required) The node entity to fetch metadata about |
| preset | `string` | | Name of the metadata preset, which defines aspects and their properties |
## Details

View File

@@ -1,7 +1,7 @@
---
Added: v2.1.0
Status: Active
Last reviewed: 2018-03-13
Last reviewed: 2018-05-03
---
# Content Node Dialog service
@@ -14,51 +14,45 @@ Displays and manages dialogs for selecting content to open, copy or upload.
- `close()`<br/>
Closes the currently open dialog.
- `getTitleTranslation(action: string = null, name: string = null): string`<br/>
- `action: string = null` -
- `getTitleTranslation(action: string = null, name: string = null): string`<br/>
Gets the translation of the dialog title.
- `action: string = null` - Name of the action to display in the dialog title
- `name: string = null` - Name of the item on which the action is being performed
- **Returns** `string` -
- **Returns** `string` - Translated version of the title
- `openCopyMoveDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null, permission?: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `action: string = null` -
- `contentEntry: MinimalNodeEntryEntity = null` -
Opens a dialog to copy or move an item to a new location.
- `action: string = null` - Name of the action (eg, "Copy" or "Move") to show in the title
- `contentEntry: MinimalNodeEntryEntity = null` - Item to be copied or moved
- `permission?: string = null` - (Optional) Permission for the operation
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about files that were copied/moved
- `openFileBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
Opens a file browser at a chosen folder location.
- `folderNodeId: string = null` - ID of the folder to use
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected file(s)
- `openFileBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`<br/>
Opens a file browser at a chosen site location.
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected file(s)
- `openFolderBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
Opens a folder browser at a chosen folder location.
- `folderNodeId: string = null` - ID of the folder to use
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected folder(s)
- `openFolderBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`<br/>
Opens a folder browser at a chosen site location.
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected folder(s)
- `openLockNodeDialog(contentEntry: MinimalNodeEntryEntity = null): Subject<string>`<br/>
Opens a lock node dialog
Opens a lock node dialog.
- `contentEntry: MinimalNodeEntryEntity = null` - Node to lock
- **Returns** `Subject<string>` -
- **Returns** `Subject<string>` - Error/status message (if any)
- `openUploadFileDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `action: string = null` -
Opens a dialog to choose a file to upload.
- `action: string = null` - Name of the action to show in the title
- `contentEntry: MinimalNodeEntryEntity = null` - Item to upload
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the chosen file(s)
- `openUploadFolderDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>`<br/>
- `action: string = null` -
Opens a dialog to choose folders to upload.
- `action: string = null` - Name of the action to show in the title
- `contentEntry: MinimalNodeEntryEntity = null` - Item to upload
- **Returns** `Observable<MinimalNodeEntryEntity[]>` -
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the chosed folder(s)
## Details
@@ -87,14 +81,6 @@ using a folder ID string. This can be obtained from the `id` property of a
dialog operation, say) or be set to one of the well-known names "-my-" , "-shared-" or
"-root-".
The `openCopyMoveDialog` and `openUploadXXX` methods require the following parameters:
| Name | Type | Description |
| ---- | ---- | ----------- |
| action | string | The label for the confirm button of the dialog. |
| contentEntry | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md) | The node we want to be copied/moved or uploaded. |
| neededPermissionForAction | string | (`openCopyMoveDialog` only) Permission required to perform the relative action (eg: copy will need the 'update' permission ). |
## See Also
- [Content node selector panel component](content-node-selector-panel.component.md)

View File

@@ -1,7 +1,7 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-04-12
Last reviewed: 2018-05-03
---
# Custom Resources service
@@ -13,56 +13,48 @@ Manages Document List information that is specific to a user.
### Methods
- `getCorrespondingNodeIds(nodeId: string = null, pagination: PaginationModel = null): Observable<string[]>`<br/>
- `nodeId: string = null` -
- `pagination: PaginationModel = null` -
- **Returns** `Observable<string[]>` -
Gets the contents of one of the well-known aliases in the form of node ID strings.
- `nodeId: string = null` - ID of the target folder node
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- **Returns** `Observable<string[]>` - List of node IDs
- `getRecentFiles(personId: string = null, pagination: PaginationModel = null): Observable<NodePaging>`<br/>
- `personId: string = null` -
- `pagination: PaginationModel = null` -
- **Returns** `Observable<NodePaging>` -
Gets files recently accessed by a user.
- `personId: string = null` - ID of the user
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- **Returns** `Observable<NodePaging>` - List of nodes for the recently used files
- `isCustomSource(folderId: string = null): boolean`<br/>
- `folderId: string = null` -
- **Returns** `boolean` -
Is the folder ID one of the well-known aliases?
- `folderId: string = null` - Folder ID name to check
- **Returns** `boolean` - True if the ID is a well-known name, false otherwise
- `loadFavorites(pagination: PaginationModel = null, includeFields: string[] = []): Observable<NodePaging>`<br/>
- `pagination: PaginationModel = null` -
- `includeFields: string[] = []` -
- **Returns** `Observable<NodePaging>` -
Gets favorite files for the current user.
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<NodePaging>` - List of favorite files
- `loadFolderByNodeId(nodeId: string = null, pagination: PaginationModel = null, includeFields: string[] = null): Observable<NodePaging>`<br/>
- `nodeId: string = null` -
- `pagination: PaginationModel = null` -
- `includeFields: string[] = null` -
- **Returns** `Observable<NodePaging>` -
Gets a folder's contents.
- `nodeId: string = null` - ID of the target folder node
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- `includeFields: string[] = null` - List of data field names to include in the results
- **Returns** `Observable<NodePaging>` - List of items contained in the folder
- `loadMemberSites(pagination: PaginationModel = null): Observable<NodePaging>`<br/>
- `pagination: PaginationModel = null` -
- **Returns** `Observable<NodePaging>` -
Gets sites that the current user is a member of.
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- **Returns** `Observable<NodePaging>` - List of sites
- `loadSharedLinks(pagination: PaginationModel = null, includeFields: string[] = []): Observable<NodePaging>`<br/>
- `pagination: PaginationModel = null` -
- `includeFields: string[] = []` -
- **Returns** `Observable<NodePaging>` -
Gets shared links for the current user.
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<NodePaging>` - List of shared links
- `loadSites(pagination: PaginationModel = null): Observable<NodePaging>`<br/>
- `pagination: PaginationModel = null` -
- **Returns** `Observable<NodePaging>` -
Gets all sites in the respository.
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- **Returns** `Observable<NodePaging>` - List of sites
- `loadTrashcan(pagination: PaginationModel = null, includeFields: string[] = []): Observable<DeletedNodesPaging>`<br/>
- `pagination: PaginationModel = null` -
- `includeFields: string[] = []` -
- **Returns** `Observable<DeletedNodesPaging>` -
Gets all items currently in the trash.
- `pagination: PaginationModel = null` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<DeletedNodesPaging>` - List of deleted items
## Details

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-10
Last reviewed: 2018-05-03
---
# Folder Create directive
@@ -31,20 +31,24 @@ Creates folders.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| nodeType | `string` | "cm:folder" | |
| nodeType | `string` | "cm:folder" | Type of node to create. |
| adf-create-folder | `string` | DEFAULT_FOLDER_PARENT_ID | Parent folder where the new folder will be located after creation. |
| title | `string` | null | |
| title | `string` | null | Title of folder creation dialog. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when the create folder give error for example a folder with same name already exist |
| success | `EventEmitter<MinimalNodeEntryEntity>` | |
| error | `EventEmitter<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the folder is created successfully. |
## Details
Pass this directive the id of the parent folder where you want the new folder node to be created.
If no value is provided, the '-my-' alias is used.
This will open a Folder Dialog component to receive data for the new folder. If the data is valid
then the dialog will emit a `folderCreate` event when it closes.
then the dialog will emit a `success` event when it closes.
## See also
- [Folder Edit directive](folder-edit.directive.md)

View File

@@ -32,14 +32,14 @@ Allows folders to be edited.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| adf-edit-folder | `MinimalNodeEntryEntity` | | Folder node to edit. |
| title | `string` | null | |
| title | `string` | null | Title of folder edit dialog. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when the edit/create folder give error for example a folder with same name already exist |
| success | `EventEmitter<MinimalNodeEntryEntity>` | |
| error | `EventEmitter<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the folder has been edited successfully. |
## Details

View File

@@ -22,12 +22,14 @@ Locks a node.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| adf-node-lock | `MinimalNodeEntryEntity` | | |
| adf-node-lock | `MinimalNodeEntryEntity` | | Node to lock/unlock. |
## Details
When the directive is clicked a dialog is shown and you can lock or unlock a file (folder cannot be locked)
there are two types of lock: indefinite lock and time lock.
When the decorated element (eg, div) is clicked, a dialog is shown to let you lock
or unlock a file (a folder cannot be locked).
There are two types of lock: indefinite lock and time lock.
If the time is not selected the user will lock the file it until will not unlock it
When a file is locked it can be locked and unlocked by default only by the user that creates the lock but you can also allow the other file owners to modify it
![adf-lock](../docassets/images/lock-directive.png)

View File

@@ -12,25 +12,22 @@ Manages the role permissions for the content nodes
### Methods
- `getGroupMemeberByGroupName(groupName: string = null, opts?: any = null): Observable<GroupMemberPaging>`<br/>
- `groupName: string = null` -
- `opts?: any = null` - (Optional)
- **Returns** `Observable<GroupMemberPaging>` -
Gets all members related to a group name.
- `groupName: string = null` - Name of group to look for members
- `opts?: any = null` - (Optional) Extra options supported by JSAPI
- **Returns** `Observable<GroupMemberPaging>` - List of members
- `getNodeRoles(node: MinimalNodeEntryEntity = null): Observable<string[]>`<br/>
- `node: MinimalNodeEntryEntity = null` -
- **Returns** `Observable<string[]>` -
Gets a list of roles for the current node.
- `node: MinimalNodeEntryEntity = null` - The target node
- **Returns** `Observable<string[]>` - Array of strings representing the roles
- `updatePermissionRoles(node: MinimalNodeEntryEntity = null, updatedPermissionRole: PermissionElement = null): Observable<MinimalNodeEntryEntity>`<br/>
- `node: MinimalNodeEntryEntity = null` -
- `updatedPermissionRole: PermissionElement = null` -
- **Returns** `Observable<MinimalNodeEntryEntity>` -
Updates the permission for a node.
- `node: MinimalNodeEntryEntity = null` - Target node
- `updatedPermissionRole: PermissionElement = null` - Permission role to update or add
- **Returns** `Observable<MinimalNodeEntryEntity>` - Node with updated permission
## Details
Content Services supports
This service needs the support for the groups api fo content services that is available from version 5.2.1
See the

View File

@@ -1,7 +1,7 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-03-23
Last reviewed: 2018-05-03
---
# Permission List Component
@@ -34,17 +34,17 @@ or custom template can be added:
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| nodeId | `string` | "" | |
| nodeId | `string` | "" | ID of the node whose permissions you want to show. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| update | `EventEmitter<PermissionElement>` | |
| update | `EventEmitter<PermissionElement>` | Emitted when the permission is updated. |
## Details
This component uses a [Datatable component](../core/datatable.component.md) to show the
permissions retrieved from the [Node service](../core/node.service.md).
For the locallyset permissions a role dropdown will be showed allowing the user to change it.
When user select a new value, the permission role is automatically updated and the `update` event is thrown.
For the locally set permissions a role dropdown will be shown to let the user select a new role.
When the user selects a new value, the permission role is automatically updated and the `update` event is emitted.