W-CF Documentation - v11.0.0
    Preparing search index...

    Class ProjectContext

    This class should be used if oparation on multiple projects inside a single EAIWS session is required. The static functions New and Load should always be used to create new or load projects. Using session.loadEmptySession or session.loadSession for a session context directly will always generate a new project without closing the previous one.

    Hierarchy (View Summary)

    Index
    • get baseUrl(): string

      Returns string

    • get isValid(): boolean

      Returns boolean

    • get owner(): EaiwsSession

      Returns the EAIWS session instance which owns this context.

      Returns EaiwsSession

    • get sessionId(): string

      ID of the current session context. If this instance is a EaiwsSession then this ID is the ID of the main EAIWS session.

      Returns string

    • Parameters

      • pUrl: string

      Returns Promise<void>

    • Disposes the EAIWS session context and closes the corresponding project.

      Parameters

      • pCloseProject: boolean = true

        If false the project will not be closed (default: true)

      Returns Promise<void>

    • Parameters

      • pType: SessionCacheFileType
      • pFile: Blob
      • OptionalpOnProgress: (pEvent: ProgressEvent, pXhr: XMLHttpRequest) => any
      • OptionalpUrlSuffix: string
      • OptionalpArchiveType: "UnixAR"

      Returns Promise<string | null>

    • Uploads the given file to the provided EAIWS upload URL. Note: If a progress callback is provided the request is performed using XmlHttpRequest otherwise using fetch.

      Parameters

      • pTargetUrl: string
      • pFile: Blob
      • OptionalpOnProgress: (pEvent: ProgressEvent, pXhr: XMLHttpRequest) => any

      Returns Promise<string>

      Returns the used upload url.