mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
Eugenio Romano
parent
b3955b3f6c
commit
68ded23c9a
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user