Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ResourceManager

Index

Methods

fetch

  • fetch(resourceName: string, libraryId: string, locale?: string): any
  • Fetches a pre-registered resource by name, performing any decoding or processing required based on the resource format.

    Parameters

    • resourceName: string

      The name that this resource was registered with, local to the libraryId.

    • libraryId: string

      The ID of the library that the resource belongs to.

    • Optional locale: string

      The locale ID of the resource to fetch. Defaults to the invariant culture ID.

    Returns any

fetchAllFor

  • fetchAllFor(libraryId: string, format: string): any[]
  • Fetches all resources of a given format from the given library.

    Parameters

    • libraryId: string

      The configured ID of the library to fetch resources for.

    • format: string

      The format of the desired resources.

    Returns any[]

injectTheme

  • injectTheme(themeUri: any): void
  • Adds a CSS theme to the collection of themes to inject when the viewer loads all of its external code dependencies.

    Parameters

    • themeUri: any

    Returns void

performThemeInjection

  • performThemeInjection(): void
  • Performs theme injection. This method is called once by an application when it has become initialized.

    Returns void

register

  • register(libraryId: string, locale: string, resourceName: string, resourceFormat: string, resourceData: any): void
  • Registers a resource against a library with a name, a format, and a base-64 encoded data chunk.

    Parameters

    • libraryId: string

      The ID of the library that the resource belongs to.

    • locale: string

      The locale that this resource is for.

    • resourceName: string

      The name of the registered resource, local to the library.

    • resourceFormat: string

      The format identifier of the resource.

    • resourceData: any

      The base-64 encoded data for this resource.

    Returns void

remove

  • remove(libraryId: string, resourceName: string, locale: string): boolean
  • Unregisters and removes a resource.

    Parameters

    • libraryId: string

      The ID of the library that the resource belongs to.

    • resourceName: string

      The name that the resource was registered with.

    • locale: string

      The locale of the resource.

    Returns boolean