[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
Status: Active
Last reviewed: 2018-05-03
Last reviewed: 2018-05-04
---
# 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)
@@ -20,18 +20,14 @@ Allow user to search people or group that could be added to the current node per
## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
### Events
| Name | Type | Description |
| -- | -- | -- |
| select | `EventEmitter<MinimalNodeEntryEntity>` | |
| select | `EventEmitter<any>` | Emitted when a permission list item is selected. |
## Details
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.
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
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)
@@ -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 |
| -- | -- | -- | -- |
| nodeId | `string` | "" | |
| nodeId | `string` | | ID of the target node. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| success | `EventEmitter<MinimalNodeEntryEntity>` | |
| error | `EventEmitter<any>` | |
| error | `EventEmitter<any>` | Emitted when an error occurs during the update. |
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the node is updated successfully. |
## Details
This component extends the [Add permission panel component](../add-permission-panel.component.md)
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
- **Returns** `Observable<any>` - NodeEntry for the copied node
- `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
- `parentId: string = null` - Parent folder ID
- **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
- `getNode(nodeId: string = null, includeFields: string[] = []): Observable<NodeEntry>`<br/>
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")
- **Returns** `Observable<NodeEntry>` - Details of the folder
- `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
- `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
- `targetParentId: string = null` - The id of the folder where the node will be moved
- **Returns** `Observable<any>` - NodeEntry for the moved node

View File

@@ -1,6 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-04
---
# Rating service
@@ -15,18 +16,18 @@ Manages ratings for items in Content Services.
Removes the current user's rating for a node.
- `nodeId: string = null` - Target node
- `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/>
Gets the current user's rating for a node.
- `nodeId: string = null` - Node to get the rating from
- `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/>
Adds the current user's rating for a node.
- `nodeId: string = null` - Target node for the rating
- `ratingType: any = null` - Type of rating (can be "likes" or "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

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-16
Last reviewed: 2018-05-04
---
# 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. |
| 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. |
| parentId | `` | | |
| parentId | `` | | **Deprecated:** 2.4.0 use rootFolderId ID of parent folder node. |
### 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. |
| id | `string` | | **Deprecated:** in 2.3.0 |
| node | `MinimalNodeEntryEntity` | | |
| showActions | `boolean` | true | show/hide version actions |
| showComments | `boolean` | true | show/hide comments |
| node | `MinimalNodeEntryEntity` | | The target node. |
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
| showComments | `boolean` | true | Toggles showing/hiding of comments |
## 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 |
| -- | -- | -- | -- |
| allowDownload | `boolean` | true | |
| node | `MinimalNodeEntryEntity` | | |
| showComments | `boolean` | true | |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| node | `MinimalNodeEntryEntity` | | Target node to manage version history. |
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| uploadError | `EventEmitter<Object>` | |
| uploadSuccess | `EventEmitter<Object>` | |
| uploadError | `EventEmitter<Object>` | Emitted when an error occurs during upload. |
| uploadSuccess | `EventEmitter<Object>` | Emitted when a file is uploaded successfully. |
## 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 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 parentId Parent folder ID
* @returns Details of the created folder node
@@ -128,7 +128,7 @@ export class DocumentListService {
/**
* 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")
* @returns Details of the folder
*/

View File

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

View File

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

View File

@@ -32,6 +32,7 @@ export class RatingService {
* Gets the current user's rating for a node.
* @param nodeId Node to get the rating from
* @param ratingType Type of rating (can be "likes" or "fiveStar")
* @returns The rating value
*/
getRating(nodeId: string, ratingType: any): any {
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 ratingType Type of rating (can be "likes" or "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 {
let ratingBody: RatingBody = {
@@ -59,6 +61,7 @@ export class RatingService {
* Removes the current user's rating for a node.
* @param nodeId Target node
* @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 {
return Observable.fromPromise(this.apiService.getInstance().core.ratingsApi.removeRating(nodeId, ratingType))

View File

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

View File

@@ -34,7 +34,7 @@ import { UploadBase } from './base-upload/upload-base';
})
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()
set parentId(nodeId: string) {
this.rootFolderId = nodeId;

View File

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

View File

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