ETagCache

zanata/etagCache~ ETagCache

The ETag cache accessor class

Constructor

new ETagCache(obj)

Source:
Parameters:
Name Type Description
obj object

the JSON object represented by JSON.stringify() this class.

Methods

getDocId() → {string}

Source:

Obtain the document id

Returns:

the document id

Type
string

getLanguage() → {string}

Source:

Obtain the language name

Returns:

the language name

Type
string

getPayload() → {*}

Source:

Obtain the payload

Returns:

the payload

Type
*

getServerETag() → {string}

Source:

Obtain the ETag

Returns:

the ETag

Type
string

getVersionId() → {string}

Source:

Obtain the version id

Returns:

the version id

Type
string

setDocId(docId)

Source:

Set the document id

Parameters:
Name Type Description
docId string

the document id

setLanguage(lang)

Source:

Set the language

Parameters:
Name Type Description
lang string

the language name

setPayload(data)

Source:

Set the payload

Parameters:
Name Type Description
data *

the payload

setServerETag(etag)

Source:

Set the ETag received from the server

Parameters:
Name Type Description
etag string

ETag

setVersionId(versionId)

Source:

Set the version id

Parameters:
Name Type Description
versionId string

the version id