/** Core */ import { Generic } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; /** Angular */ import * as ng from "@angular/core"; /** * Api path where the download is made */ export declare const DOWNLOAD_FILE_API_PATH = "api/GenericService/DownloadAttachment"; /** * Key for the entity documentation id in the download request data */ export declare const DOWNLOAD_FILE_REQUEST_DOCUMENTATION_KEY = "attachment-id"; /** * Page settings links utility methods */ export declare class EntityAttachmentsUtil extends Generic { /** * Data for Content type generic table */ contentTypeTableArray: Array; /** * Get a Blob object that represents the contents of an * EntityDocumentation object. * * @param entityDocumentation The EntityDocumentation object whose * contents will be returned in the form of a Blob object. * * @returns A promise that fulfills to the Blob object that * represents the contents of the EntityDocumentation parameter or * "null" if no Blob could be found. */ private getBlobForEntityDocumentation; /** * Given a file name (with extension) the method * will return the correct mime type * * @param fileName File name with extension */ getFileMimeType(fileName: string): Promise; /** * Open or download entity document * @param entityDocumentation Entity documentation entity to open or download * @param isToOpen If true entity documentation attachment will be open if false will be downloaded * * @returns A Promise that is fulfilled when the document is open or download. No value is returned by the promise. */ openOrDownloadEntityDocument(entityDocumentation: Cmf.Foundation.BusinessObjects.EntityDocumentation, isToOpen?: boolean): Promise; /** * View a document inside of the current page in a modal dialog. * * @param _elementRef The Angular element ref that represents this * component in the DOM. * * @param entityDocumentation Entity Documentation to view. * * @returns A Promise that is fulfilled when the modal dialog is * open. No value is returned by the promise. */ viewEntityDocumentInDialog(elementRef: ng.ElementRef, entityDocumentation: Cmf.Foundation.BusinessObjects.EntityDocumentation): Promise; /** * Download the attachment content asynchronously * @param entityDocumentation Entity documentation where the attachment is linked * @returns a promise to the file content blob */ downloadAttachmentContent(entityDocumentation: Cmf.Foundation.BusinessObjects.EntityDocumentation): Promise; }