Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DocumentBuilder

Utility class to build a Document.

Hierarchy

  • DocumentBuilder

Index

Constructors

constructor

Properties

Private doc

Methods

build

Private generatePermanentId

  • generatePermanentId(): string

marshal

  • marshal(): { author?: string; clickableUri?: string; compressedBinaryData?: { compressionType: CompressionType; data: string }; compressionType: undefined; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: undefined; title: string } | { author?: string; clickableUri?: string; compressedBinaryData?: { compressionType: CompressionType; data: string }; compressionType: undefined; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: { allowAnonymous: boolean; allowedPermissions: SecurityIdentity[]; deniedPermissions: SecurityIdentity[] }[]; title: string } | { author?: string; clickableUri?: string; compressedBinaryData: string; compressionType: CompressionType; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: undefined; title: string } | { author?: string; clickableUri?: string; compressedBinaryData: string; compressionType: CompressionType; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: { allowAnonymous: boolean; allowedPermissions: SecurityIdentity[]; deniedPermissions: SecurityIdentity[] }[]; title: string }
  • Marshal the document into a JSON format accepted by the push API.

    Returns { author?: string; clickableUri?: string; compressedBinaryData?: { compressionType: CompressionType; data: string }; compressionType: undefined; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: undefined; title: string } | { author?: string; clickableUri?: string; compressedBinaryData?: { compressionType: CompressionType; data: string }; compressionType: undefined; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: { allowAnonymous: boolean; allowedPermissions: SecurityIdentity[]; deniedPermissions: SecurityIdentity[] }[]; title: string } | { author?: string; clickableUri?: string; compressedBinaryData: string; compressionType: CompressionType; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: undefined; title: string } | { author?: string; clickableUri?: string; compressedBinaryData: string; compressionType: CompressionType; data?: string; date?: string; documentId: string; fileExtension?: string; modifiedDate?: string; parentId?: string; permanentId?: string; permissions: { allowAnonymous: boolean; allowedPermissions: SecurityIdentity[]; deniedPermissions: SecurityIdentity[] }[]; title: string }

Private marshalCompressedBinaryData

  • marshalCompressedBinaryData(): { compressedBinaryData: undefined; compressionType: undefined } | { compressedBinaryData: string; compressionType: CompressionType }

Private marshalMetadata

Private marshalPermissions

  • marshalPermissions(): { permissions: undefined } | { permissions: { allowAnonymous: boolean; allowedPermissions: SecurityIdentity[]; deniedPermissions: SecurityIdentity[] }[] }

Private setPermission

  • setPermission(securityIdentityBuilder: SecurityIdentityBuilder, permissionSection: "allowedPermissions" | "deniedPermissions"): void

Private validateAndFillMissing

  • validateAndFillMissing(): void

Private validateCompressedBinaryData

  • validateCompressedBinaryData(data: string): void

Private validateDateAndReturnValidDate

  • validateDateAndReturnValidDate(d: string | number | Date): string

withAllowAnonymousUsers

withAllowedPermissions

withAuthor

withClickableUri

withCompressedBinaryData

withData

withDate

withDeniedPermissions

withFileExtension

withMetadata

withMetadataValue

withModifiedDate

withParentID

withPermanentId

Generated using TypeDoc