UNPKG

@alfresco/adf-content-services

Version:
70 lines (69 loc) 2.9 kB
/*! * @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 { ContentNodeDialogService } from '../../content-node-selector/content-node-dialog.service'; import * as i0 from "@angular/core"; export declare class DocumentActionsService { private nodeActionsService; private contentNodeDialogService; private translation; private documentListService?; private contentService?; permissionEvent: Subject<PermissionModel>; error: Subject<Error>; success: Subject<string>; private handlers; constructor(nodeActionsService: NodeActionsService, contentNodeDialogService: ContentNodeDialogService, translation: TranslationService, documentListService?: DocumentListService, contentService?: ContentService); /** * Gets the handler for an action. * * @param key Identifier of the action * @returns The handler for the action */ getHandler(key: string): ContentActionHandler; /** * Sets a new handler for an action. * * @param key Identifier of the action * @param handler Handler for the action * @returns False if the key was an empty/null string, true otherwise */ setHandler(key: string, handler: ContentActionHandler): boolean; /** * Checks if actions can be executed for an item. * * @param nodeEntry Item to receive an action * @returns True if the action can be executed on this item, false otherwise */ canExecuteAction(nodeEntry: NodeEntry): boolean; private setupActionHandlers; private lockNode; private downloadNode; private copyNode; private moveNode; private prepareHandlers; private deleteNode; static ɵfac: i0.ɵɵFactoryDeclaration<DocumentActionsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<DocumentActionsService>; }