@alfresco/adf-content-services
Version:
Alfresco ADF content services
67 lines (66 loc) • 2.68 kB
TypeScript
/*!
* @license
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { TranslationService } from '@alfresco/adf-core';
import { ContentService } from '../../common/services/content.service';
import { NodeEntry } from '@alfresco/js-api';
import { Subject } from 'rxjs';
import { ContentActionHandler } from '../models/content-action.model';
import { PermissionModel } from '../models/permissions.model';
import { DocumentListService } from './document-list.service';
import { NodeActionsService } from './node-actions.service';
import * as i0 from "@angular/core";
export declare class FolderActionsService {
private nodeActionsService;
private documentListService;
private contentService;
private translation;
permissionEvent: Subject<PermissionModel>;
error: Subject<Error>;
success: Subject<string>;
private handlers;
constructor(nodeActionsService: NodeActionsService, documentListService: DocumentListService, contentService: ContentService, translation: TranslationService);
/**
* Gets the handler function for an action.
*
* @param key Identifier for the action
* @returns The handler function
*/
getHandler(key: string): ContentActionHandler;
/**
* Sets a new handler function for an action.
*
* @param key Identifier for the action
* @param handler The new handler function
* @returns True if the key was a valid action identifier, false otherwise
*/
setHandler(key: string, handler: ContentActionHandler): boolean;
/**
* Checks if an action is available for a particular item.
*
* @param nodeEntry Item to check
* @returns True if the action is available, false otherwise
*/
canExecuteAction(nodeEntry: NodeEntry): boolean;
private setupActionHandlers;
private downloadNode;
private copyNode;
private moveNode;
private prepareHandlers;
private deleteNode;
static ɵfac: i0.ɵɵFactoryDeclaration<FolderActionsService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<FolderActionsService>;
}