[ADF-2905] Added JSDocs for core (#3281)

* [ADF-2905] Updated JSDocs for core

* [ADF-2905] Added missing JSDoc for user pref service
This commit is contained in:
Andy Stark
2018-05-08 15:30:23 +01:00
committed by Eugenio Romano
parent d456b3cba1
commit dd1b8893cc
10 changed files with 102 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ export class SitesService {
/**
* Gets a list of all sites in the repository.
* @param opts Options supported by JSAPI
* @returns List of sites
*/
getSites(opts: any = {}): Observable<SitePaging> {
const defaultOptions = {
@@ -47,6 +48,7 @@ export class SitesService {
* Gets the details for a site.
* @param siteId ID of the target site
* @param opts Options supported by JSAPI
* @returns Information about the site
*/
getSite(siteId: string, opts?: any): Observable<SiteEntry> {
return Observable.fromPromise(this.apiService.getInstance().core.sitesApi.getSite(siteId, opts))
@@ -57,6 +59,7 @@ export class SitesService {
* Deletes a site.
* @param siteId Site to delete
* @param permanentFlag True: deletion is permanent; False: site is moved to the trash
* @returns Null response notifying when the operation is complete
*/
deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any> {
let options: any = {};
@@ -68,6 +71,7 @@ export class SitesService {
/**
* Gets a site's content.
* @param siteId ID of the target site
* @returns Site content
*/
getSiteContent(siteId: string): Observable<SiteEntry> {
return this.getSite(siteId, { relations: ['containers'] });
@@ -76,6 +80,7 @@ export class SitesService {
/**
* Gets a list of all a site's members.
* @param siteId ID of the target site
* @returns Site members
*/
getSiteMembers(siteId: string): Observable<SiteEntry> {
return this.getSite(siteId, { relations: ['members'] });
@@ -83,6 +88,7 @@ export class SitesService {
/**
* Gets the username of the user currently logged into ACS.
* @returns Username string
*/
getEcmCurrentLoggedUserName(): string {
return this.apiService.getInstance().ecmAuth.username;