Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Index

Manages index communication with a server

Hierarchy

  • AJAX
    • Index

Index

Constructors

constructor

  • new Index(baseUrl?: string, cacheTimeout?: undefined | number, responseTimeout?: undefined | number): Index
  • Creates a new managed index instance.

    Parameters

    • Default value baseUrl: string = ""
         Base URL of the server
      
    • Optional cacheTimeout: undefined | number
         Use 0 milliseconds to turn off all cache systems
      
    • Optional responseTimeout: undefined | number
         Time in milliseconds to wait for a server response
      

    Returns Index

Properties

baseUrl

baseUrl: string

Base URL of the server

cacheTimeout

cacheTimeout: number

Set to 0 to turn off all cache systems

responseTimeout

responseTimeout: number

Time in milliseconds to wait for a server response

Static Readonly SUBFOLDER

SUBFOLDER: "index/" = "index/"

Subfolder of index files

Methods

hasOpenRequest

  • hasOpenRequest(): boolean
  • Checks for open requests.

    Returns boolean

loadFileIndex

  • loadFileIndex(headline: string): Promise<IFileIndex>

loadHeadlines

  • loadHeadlines(): Promise<Array<string>>
  • Loads the index of headline keys from the server.

    Returns Promise < Array < string > >

request

  • request(urlPath: string): Promise<IAjaxResponse>
  • Requests a server resource.

    Parameters

    • urlPath: string
         Base relative path to the requested server resource.
      

    Returns Promise < IAjaxResponse >

Static parse

Static stringify

Static stringifyHeadlines

  • stringifyHeadlines(headlines: Array<string>): string
  • Converts the headline index into a text.

    Parameters

    • headlines: Array<string>
         Headlines index
      

    Returns string

Generated using TypeDoc