[ADF-1769] Added JSDocs to services (#2937)

* [ADF-1769] Added JSDocs to services

* Removed JSDoc return directives from doc comments
This commit is contained in:
Andy Stark
2018-02-13 22:44:47 +00:00
committed by Eugenio Romano
parent b3955b3f6c
commit 68ded23c9a
10 changed files with 331 additions and 63 deletions

View File

@@ -41,6 +41,10 @@ export class FolderActionsService {
this.setupActionHandlers();
}
/**
* Gets the handler function for an action.
* @param key Identifier for the action
*/
getHandler(key: string): ContentActionHandler {
if (key) {
let lkey = key.toLowerCase();
@@ -49,6 +53,11 @@ export class FolderActionsService {
return null;
}
/**
* Sets a new handler function for an action.
* @param key Identifier for the action
* @param handler The new handler function
*/
setHandler(key: string, handler: ContentActionHandler): boolean {
if (key) {
let lkey = key.toLowerCase();
@@ -58,6 +67,10 @@ export class FolderActionsService {
return false;
}
/**
* Checks if an action is available for a particular item.
* @param obj Item to check
*/
canExecuteAction(obj: any): boolean {
return this.documentListService && obj && obj.entry.isFolder === true;
}