[ADF-1769] Added JSDocs for services (#2949)

This commit is contained in:
Andy Stark
2018-02-14 14:20:10 +00:00
committed by Eugenio Romano
parent 8bfac2f9f8
commit 9887d8bca4
16 changed files with 182 additions and 54 deletions

View File

@@ -4,6 +4,18 @@ Shows a notification message with optional feedback.
![Notification Service screenshot](docassets/images/NotiService.png)
## Methods
- `openSnackMessage(message: string, millisecondsDuration?: number): MatSnackBarRef<any>`
Opens a snackbar notification to show a message.
- `message` - The message to show
- `millisecondsDuration` - (Optional) Time before notification disappears after being shown
- `openSnackMessageAction(message: string, action: string, millisecondsDuration?: number): MatSnackBarRef<any>`
Opens a snackbar notification with a message and a response button.
- `message` - The message to show
- `action` - Caption for the response button
- `millisecondsDuration` - (Optional) Time before the notification disappears (unless the button is clicked)
## Details
The Notification Service is implemented on top of the Angular Material Design snackbar.

View File

@@ -4,8 +4,9 @@ Sets the page title.
## Methods
`setTitle(value: string = '')`<br/>
Sets the page title.
- `setTitle(value: string = '')`
Sets the page title.
- `value` - The new title
## Details

View File

@@ -4,11 +4,12 @@ Gets information about a Content Services user.
## Methods
`getPerson(personId: string): Observable<any>`<br/>
Gets information about a user identified by their username.
- `getPerson(personId: string): Observable<any>`
Gets information about a user identified by their username.
- `personId` - ID of the target user
- `getCurrentPerson(): Observable<any>`
Gets information about the user who is currently logged-in.
`getCurrentPerson(): Observable<any>`<br/>
Gets information about the user who is currently logged-in.
## Details

View File

@@ -4,17 +4,21 @@ Gets information about Process Services users.
## Methods
`getWorkflowUsers(taskId?: string, searchWord?: string): Observable<UserProcessModel[]>`<br/>
Gets information about users across all tasks.
`getUserImage(user: UserProcessModel): string`<br/>
Gets the profile picture URL for the specified user.
`involveUserWithTask(taskId: string, idToInvolve: string): Observable<UserProcessModel[]>`<br/>
Sets a user to be involved with a task.
`removeInvolvedUser(taskId: string, idToRemove: string): Observable<UserProcessModel[]>`<br/>
Removes a user who is currently involved with a task.
- `getWorkflowUsers(taskId?: string, searchWord?: string): Observable<UserProcessModel[]>`
Gets information about users across all tasks.
- `taskId` - (Optional) ID of the task
- `searchWord` - (Optional) Filter text to search for
- `getUserImage(user: UserProcessModel): string`
Gets the profile picture URL for the specified user.
- `user` - The target user
- `involveUserWithTask(taskId: string, idToInvolve: string): Observable<UserProcessModel[]>`
Sets a user to be involved with a task.
- `taskId` - ID of the target task
- `idToInvolve` - ID of the user to involve
- `removeInvolvedUser(taskId: string, idToRemove: string): Observable<UserProcessModel[]>`
Removes a user who is currently involved with a task.
- `taskId` - ID of the target task
- `idToRemove` - ID of the user to remove
## Details

View File

@@ -4,14 +4,19 @@ Manages ratings for items in Content Services.
## Methods
`getRating(nodeId: string, ratingType: any): any`<br/>
Gets the current user's rating for a node.
`postRating(nodeId: string, ratingType: any, vote: any): any`<br/>
Adds the current user's rating for a node.
`deleteRating(nodeId: string, ratingType: any): any`<br/>
Removes the current user's rating for a node.
- `getRating(nodeId: string, ratingType: any): any`
Gets the current user's rating for a node.
- `nodeId` - Node to get the rating from
- `ratingType` - Type of rating (can be "likes" or "fiveStar")
- `postRating(nodeId: string, ratingType: any, vote: any): any`
Adds the current user's rating for a node.
- `nodeId` - Target node for the rating
- `ratingType` - Type of rating (can be "likes" or "fiveStar")
- `vote` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
- `deleteRating(nodeId: string, ratingType: any): any`
Removes the current user's rating for a node.
- `nodeId` - Target node
- `ratingType` - Type of rating to remove (can be "likes" or "fiveStar")
## Details

View File

@@ -4,8 +4,9 @@ Finds shared links to Content Services items.
## Methods
`getSharedLinks(options: any = {}): Observable<NodePaging>`<br/>
Gets shared links available to the current user.
- `getSharedLinks(options: any = {}): Observable<NodePaging>`
Gets shared links available to the current user.
- `options` - Options supported by JSAPI
## Details

View File

@@ -4,20 +4,23 @@ Accesses and manipulates sites from a Content Services repository.
## Methods
`getSites(opts: any = {}): any`<br/>
Gets a list of all sites in the repository.
`getSite(siteId: string, opts?: any): any`<br/>
Gets the details for a site.
`deleteSite(siteId: string, permanentFlag: boolean = true): any`<br/>
Deletes a site.
`getSiteContent(siteId: string): Observable<any>`<br/>
Gets a site's content.
`getSiteMembers(siteId: string): Observable<any>`<br/>
Gets a list of all a site's members.
- `getSites(opts: any = {}): Observable<SitePaging>`
Gets a list of all sites in the repository.
- `opts` - Options supported by JSAPI
- `getSite(siteId: string, opts?: any): Observable<SiteEntry>`
Gets the details for a site.
- `siteId` - ID of the target site
- `opts` - (Optional) Options supported by JSAPI
- `deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any>`
Deletes a site.
- `siteId` - Site to delete
- `permanentFlag` - True: deletion is permanent; False: site is moved to the trash
- `getSiteContent(siteId: string): Observable<SiteEntry>`
Gets a site's content.
- `siteId` - ID of the target site
- `getSiteMembers(siteId: string): Observable<SiteEntry>`
Gets a list of all a site's members.
- `siteId` - ID of the target site
## Details

View File

@@ -4,20 +4,22 @@ Stores items in the form of key-value pairs.
## Methods
`getItem(key: string): string | null` <br/>
Gets an item identified by `key`.
- `getItem(key: string): string`
Gets an item.
- `key` - Key to identify the item
- `setItem(key: string, data: string)`
Stores an item
- `key` - Key to identify the item
- `data` - Data to store
- `clear()`
Removes all currently stored items.
`setItem(key: string, data: string)` <br/>
Stores an item under `key`.
`clear()` <br/>
Removes all currently stored items.
`removeItem(key: string)` <br/>
Removes the item identified by `key`.
`hasItem(key: string): boolean` <br/>
Is any item currently stored under `key`?
- `removeItem(key: string)`
Removes a single item.
- `key` - Key to identify the item
- `hasItem(key: string): boolean`
Is any item currently stored under `key`?
- `key` - Key identifying item to check
## Details