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

* [ADF-2905] Updated JSDocs for content services

* [ADF-2905] Added missing update to version manager MD file
This commit is contained in:
Andy Stark
2018-05-04 13:56:01 +01:00
committed by Eugenio Romano
parent b393708514
commit 563af3bbfa
15 changed files with 50 additions and 40 deletions

View File

@@ -1,12 +1,12 @@
--- ---
Added: v2.4.0 Added: v2.4.0
Status: Active Status: Active
Last reviewed: 2018-05-03 Last reviewed: 2018-05-04
--- ---
# Add Permission Component # Add Permission Component
Allow user to search people or group that could be added to the current node permissions. Searches for people or groups to add to the current node permissions.
![Add Permission Component](../docassets/images/add-permission-component.png) ![Add Permission Component](../docassets/images/add-permission-component.png)
@@ -20,18 +20,14 @@ Allow user to search people or group that could be added to the current node per
## Class members ## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| select | `EventEmitter<MinimalNodeEntryEntity>` | | | select | `EventEmitter<any>` | Emitted when a permission list item is selected. |
## Details ## Details
This component uses a [Search component](../search.component.md) to retrieve the This component uses a [Search component](../search.component.md) to retrieve the
groups and people that could be added to the permission list of the current node. groups and people that could be added to the permission list of the current node.
The `select` event will be emitted when a result is clicked from the list. The `select` event is emitted when a result is clicked from the list.

View File

@@ -6,7 +6,7 @@ Last reviewed: 2018-05-03
# Add Permission Component # Add Permission Component
Allow user to search people or group that could be added to the current node permissions. Searches for people or groups to add to the current node permissions.
![Add Permission Component](../docassets/images/add-permission-component.png) ![Add Permission Component](../docassets/images/add-permission-component.png)
@@ -24,18 +24,17 @@ Allow user to search people or group that could be added to the current node per
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | -- | -- | -- | -- |
| nodeId | `string` | "" | | | nodeId | `string` | | ID of the target node. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| success | `EventEmitter<MinimalNodeEntryEntity>` | | | error | `EventEmitter<any>` | Emitted when an error occurs during the update. |
| error | `EventEmitter<any>` | | | success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the node is updated successfully. |
## Details ## Details
This component extends the [Add permission panel component](../add-permission-panel.component.md) This component extends the [Add permission panel component](../add-permission-panel.component.md)
and apply the action confirm when the selection made is accepted. and apply the action confirm when the selection made is accepted.
The `success` event will be emitted when the node is correctly updated.
The `error` event will be thrown whenever the node update permission will fail.

View File

@@ -18,7 +18,7 @@ Implements node operations used by the Document List component.
- `targetParentId: string = null` - The id of the folder where the node will be copied - `targetParentId: string = null` - The id of the folder where the node will be copied
- **Returns** `Observable<any>` - NodeEntry for the copied node - **Returns** `Observable<any>` - NodeEntry for the copied node
- `createFolder(name: string = null, parentId: string = null): Observable<MinimalNodeEntity>`<br/> - `createFolder(name: string = null, parentId: string = null): Observable<MinimalNodeEntity>`<br/>
Create a new folder in the path. Creates a new folder in the path.
- `name: string = null` - Folder name - `name: string = null` - Folder name
- `parentId: string = null` - Parent folder ID - `parentId: string = null` - Parent folder ID
- **Returns** `Observable<MinimalNodeEntity>` - Details of the created folder node - **Returns** `Observable<MinimalNodeEntity>` - Details of the created folder node
@@ -51,7 +51,7 @@ Implements node operations used by the Document List component.
- **Returns** `string` - Path to the icon file - **Returns** `string` - Path to the icon file
- `getNode(nodeId: string = null, includeFields: string[] = []): Observable<NodeEntry>`<br/> - `getNode(nodeId: string = null, includeFields: string[] = []): Observable<NodeEntry>`<br/>
Gets a node via its node ID. Gets a node via its node ID.
- `nodeId: string = null` - - `nodeId: string = null` - ID of the target node
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association") - `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** `Observable<NodeEntry>` - Details of the folder - **Returns** `Observable<NodeEntry>` - Details of the folder
- `hasPermission(node: any = null, permission: PermissionsEnum | string = null): boolean`<br/> - `hasPermission(node: any = null, permission: PermissionsEnum | string = null): boolean`<br/>
@@ -61,7 +61,7 @@ Implements node operations used by the Document List component.
- **Returns** `boolean` - True if the node has the permission, false otherwise - **Returns** `boolean` - True if the node has the permission, false otherwise
- `moveNode(nodeId: string = null, targetParentId: string = null): Observable<any>`<br/> - `moveNode(nodeId: string = null, targetParentId: string = null): Observable<any>`<br/>
Move a node to destination node Moves a node to destination node.
- `nodeId: string = null` - The id of the node to be moved - `nodeId: string = null` - The id of the node to be moved
- `targetParentId: string = null` - The id of the folder where the node will be moved - `targetParentId: string = null` - The id of the folder where the node will be moved
- **Returns** `Observable<any>` - NodeEntry for the moved node - **Returns** `Observable<any>` - NodeEntry for the moved node

View File

@@ -1,6 +1,7 @@
--- ---
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
Last reviewed: 2018-05-04
--- ---
# Rating service # Rating service
@@ -15,18 +16,18 @@ Manages ratings for items in Content Services.
Removes the current user's rating for a node. Removes the current user's rating for a node.
- `nodeId: string = null` - Target node - `nodeId: string = null` - Target node
- `ratingType: any = null` - Type of rating to remove (can be "likes" or "fiveStar") - `ratingType: any = null` - Type of rating to remove (can be "likes" or "fiveStar")
- **Returns** `any` - - **Returns** `any` - Null response indicating that the operation is complete
- `getRating(nodeId: string = null, ratingType: any = null): any`<br/> - `getRating(nodeId: string = null, ratingType: any = null): any`<br/>
Gets the current user's rating for a node. Gets the current user's rating for a node.
- `nodeId: string = null` - Node to get the rating from - `nodeId: string = null` - Node to get the rating from
- `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar") - `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar")
- **Returns** `any` - - **Returns** `any` - The rating value
- `postRating(nodeId: string = null, ratingType: any = null, vote: any = null): any`<br/> - `postRating(nodeId: string = null, ratingType: any = null, vote: any = null): any`<br/>
Adds the current user's rating for a node. Adds the current user's rating for a node.
- `nodeId: string = null` - Target node for the rating - `nodeId: string = null` - Target node for the rating
- `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar") - `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar")
- `vote: any = null` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar") - `vote: any = null` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
- **Returns** `any` - - **Returns** `any` - Details about the rating, including the new value
## Details ## Details

View File

@@ -1,7 +1,7 @@
--- ---
Added: v2.0.0 Added: v2.0.0
Status: Active Status: Active
Last reviewed: 2018-04-16 Last reviewed: 2018-05-04
--- ---
# Upload Drag Area Component # Upload Drag Area Component
@@ -42,7 +42,7 @@ export class AppComponent {
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. | | maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. | | rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| versioning | `boolean` | false | Toggles versioning. | | versioning | `boolean` | false | Toggles versioning. |
| parentId | `` | | | | parentId | `` | | **Deprecated:** 2.4.0 use rootFolderId ID of parent folder node. |
### Events ### Events

View File

@@ -21,9 +21,9 @@ Displays the version history of a node in a Version Manager component
| -- | -- | -- | -- | | -- | -- | -- | -- |
| allowDownload | `boolean` | true | Enable/disable possibility to download a version of the current node. | | allowDownload | `boolean` | true | Enable/disable possibility to download a version of the current node. |
| id | `string` | | **Deprecated:** in 2.3.0 | | id | `string` | | **Deprecated:** in 2.3.0 |
| node | `MinimalNodeEntryEntity` | | | | node | `MinimalNodeEntryEntity` | | The target node. |
| showActions | `boolean` | true | show/hide version actions | | showActions | `boolean` | true | Toggles showing/hiding of version actions |
| showComments | `boolean` | true | show/hide comments | | showComments | `boolean` | true | Toggles showing/hiding of comments |
## Details ## Details

View File

@@ -28,16 +28,16 @@ Displays the version history of a node with the ability to upload a new version.
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
| -- | -- | -- | -- | | -- | -- | -- | -- |
| allowDownload | `boolean` | true | | | allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| node | `MinimalNodeEntryEntity` | | | | node | `MinimalNodeEntryEntity` | | Target node to manage version history. |
| showComments | `boolean` | true | | | showComments | `boolean` | true | Toggles showing/hiding of comments. |
### Events ### Events
| Name | Type | Description | | Name | Type | Description |
| -- | -- | -- | | -- | -- | -- |
| uploadError | `EventEmitter<Object>` | | | uploadError | `EventEmitter<Object>` | Emitted when an error occurs during upload. |
| uploadSuccess | `EventEmitter<Object>` | | | uploadSuccess | `EventEmitter<Object>` | Emitted when a file is uploaded successfully. |
## Details ## Details

View File

@@ -90,7 +90,7 @@ export class DocumentListService {
} }
/** /**
* Move a node to destination node * Moves a node to destination node.
* *
* @param nodeId The id of the node to be moved * @param nodeId The id of the node to be moved
* @param targetParentId The id of the folder where the node will be moved * @param targetParentId The id of the folder where the node will be moved
@@ -102,7 +102,7 @@ export class DocumentListService {
} }
/** /**
* Create a new folder in the path. * Creates a new folder in the path.
* @param name Folder name * @param name Folder name
* @param parentId Parent folder ID * @param parentId Parent folder ID
* @returns Details of the created folder node * @returns Details of the created folder node
@@ -128,7 +128,7 @@ export class DocumentListService {
/** /**
* Gets a node via its node ID. * Gets a node via its node ID.
* @param nodeId * @param nodeId ID of the target node
* @param includeFields Extra information to include (available options are "aspectNames", "isLink" and "association") * @param includeFields Extra information to include (available options are "aspectNames", "isLink" and "association")
* @returns Details of the folder * @returns Details of the folder
*/ */

View File

@@ -38,6 +38,7 @@ export class AddPermissionPanelComponent {
@ViewChild('search') @ViewChild('search')
search: SearchComponent; search: SearchComponent;
/** Emitted when a permission list item is selected. */
@Output() @Output()
select: EventEmitter<any> = new EventEmitter(); select: EventEmitter<any> = new EventEmitter();

View File

@@ -27,12 +27,15 @@ import { NodePermissionService } from '../../services/node-permission.service';
}) })
export class AddPermissionComponent { export class AddPermissionComponent {
/** ID of the target node. */
@Input() @Input()
nodeId: string; nodeId: string;
/** Emitted when the node is updated successfully. */
@Output() @Output()
success: EventEmitter<MinimalNodeEntryEntity> = new EventEmitter(); success: EventEmitter<MinimalNodeEntryEntity> = new EventEmitter();
/** Emitted when an error occurs during the update. */
@Output() @Output()
error: EventEmitter<any> = new EventEmitter(); error: EventEmitter<any> = new EventEmitter();

View File

@@ -32,6 +32,7 @@ export class RatingService {
* Gets the current user's rating for a node. * Gets the current user's rating for a node.
* @param nodeId Node to get the rating from * @param nodeId Node to get the rating from
* @param ratingType Type of rating (can be "likes" or "fiveStar") * @param ratingType Type of rating (can be "likes" or "fiveStar")
* @returns The rating value
*/ */
getRating(nodeId: string, ratingType: any): any { getRating(nodeId: string, ratingType: any): any {
return Observable.fromPromise(this.apiService.getInstance().core.ratingsApi.getRating(nodeId, ratingType)) return Observable.fromPromise(this.apiService.getInstance().core.ratingsApi.getRating(nodeId, ratingType))
@@ -44,6 +45,7 @@ export class RatingService {
* @param nodeId Target node for the rating * @param nodeId Target node for the rating
* @param ratingType Type of rating (can be "likes" or "fiveStar") * @param ratingType Type of rating (can be "likes" or "fiveStar")
* @param vote Rating value (boolean for "likes", numeric 0..5 for "fiveStar") * @param vote Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
* @returns Details about the rating, including the new value
*/ */
postRating(nodeId: string, ratingType: any, vote: any): any { postRating(nodeId: string, ratingType: any, vote: any): any {
let ratingBody: RatingBody = { let ratingBody: RatingBody = {
@@ -59,6 +61,7 @@ export class RatingService {
* Removes the current user's rating for a node. * Removes the current user's rating for a node.
* @param nodeId Target node * @param nodeId Target node
* @param ratingType Type of rating to remove (can be "likes" or "fiveStar") * @param ratingType Type of rating to remove (can be "likes" or "fiveStar")
* @returns Null response indicating that the operation is complete
*/ */
deleteRating(nodeId: string, ratingType: any): any { deleteRating(nodeId: string, ratingType: any): any {
return Observable.fromPromise(this.apiService.getInstance().core.ratingsApi.removeRating(nodeId, ratingType)) return Observable.fromPromise(this.apiService.getInstance().core.ratingsApi.removeRating(nodeId, ratingType))

View File

@@ -23,6 +23,7 @@ import 'rxjs/add/observable/throw';
@Injectable() @Injectable()
export class TagService { export class TagService {
/** Emitted when tag information is updated. */
@Output() @Output()
refresh = new EventEmitter(); refresh = new EventEmitter();

View File

@@ -34,7 +34,7 @@ import { UploadBase } from './base-upload/upload-base';
}) })
export class UploadDragAreaComponent extends UploadBase implements NodePermissionSubject { export class UploadDragAreaComponent extends UploadBase implements NodePermissionSubject {
/** @deprecaretd 2.4.0 use rootFolderId ID of parent folder node. */ /** @deprecated 2.4.0 use rootFolderId ID of parent folder node. */
@Input() @Input()
set parentId(nodeId: string) { set parentId(nodeId: string) {
this.rootFolderId = nodeId; this.rootFolderId = nodeId;

View File

@@ -40,18 +40,19 @@ export class VersionListComponent implements OnChanges {
@Input() @Input()
id: string; id: string;
/** The target node. */
@Input() @Input()
node: MinimalNodeEntryEntity; node: MinimalNodeEntryEntity;
/** show/hide comments */ /** Toggles showing/hiding of comments */
@Input() @Input()
showComments = true; showComments = true;
/** Enable/disable possibility to download a version of the current node. */ /** Enable/disable downloading a version of the current node. */
@Input() @Input()
allowDownload = true; allowDownload = true;
/** show/hide version actions */ /** Toggles showing/hiding of version actions */
@Input() @Input()
showActions = true; showActions = true;

View File

@@ -43,18 +43,23 @@ import { trigger, state, style, animate, transition } from '@angular/animations'
}) })
export class VersionManagerComponent { export class VersionManagerComponent {
/** Target node to manage version history. */
@Input() @Input()
node: MinimalNodeEntryEntity; node: MinimalNodeEntryEntity;
/** Toggles showing/hiding of comments. */
@Input() @Input()
showComments = true; showComments = true;
/** Enable/disable downloading a version of the current node. */
@Input() @Input()
allowDownload = true; allowDownload = true;
/** Emitted when a file is uploaded successfully. */
@Output() @Output()
uploadSuccess = new EventEmitter(); uploadSuccess = new EventEmitter();
/** Emitted when an error occurs during upload. */
@Output() @Output()
uploadError = new EventEmitter(); uploadError = new EventEmitter();