transformation-controller

Methods

(inner) _addMediaHash(survey) → {Promise}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject

survey object

Returns:

always resolved promise

Type
Promise

(inner) _authenticate(survey) → {Promise.<module:survey-model~SurveyObject>}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject

survey object

Returns:

a Promise resolving with survey object

Type
Promise.<module:survey-model~SurveyObject>

(inner) _checkQuota(survey) → {Promise.<module:survey-model~SurveyObject>}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject

survey object

Returns:

a Promise resolving with survey object

Type
Promise.<module:survey-model~SurveyObject>

(inner) _getCombinedHash(survey) → {string}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject

survey object

Returns:
  • a hash
Type
string

(inner) _getFormFromCache(survey) → {Promise.<module:survey-model~SurveyObject>}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject

survey object

Returns:

a Promise resolving with survey object

Type
Promise.<module:survey-model~SurveyObject>

(inner) _getSurveyParams(req) → {Promise.<module:survey-model~SurveyObject>}

Source:
Parameters:
Name Type Description
req module:api-controller~ExpressRequest

HTTP request

Returns:

a Promise resolving with survey object

Type
Promise.<module:survey-model~SurveyObject>

(inner) _respond(res, survey)

Source:
Parameters:
Name Type Description
res module:api-controller~ExpressResponse

HTTP response

survey module:survey-model~SurveyObject

survey object

(inner) _setCookieAndCredentials(survey, req) → {Promise.<module:survey-model~SurveyObject>}

Source:
Parameters:
Name Type Description
survey module:survey-model~SurveyObject

survey object

req module:api-controller~ExpressRequest

HTTP request

Returns:

a Promise resolving with survey object with added credentials

Type
Promise.<module:survey-model~SurveyObject>

(inner) _updateCache(survey) → {Promise.<module:survey-model~SurveyObject>}

Source:

Update the Cache if necessary.

Parameters:
Name Type Description
survey module:survey-model~SurveyObject

survey object

Returns:

a Promise resolving with survey object

Type
Promise.<module:survey-model~SurveyObject>

(inner) getSurveyHash(req, res, next)

Source:

Obtains the hash of the cached Survey Parts

Parameters:
Name Type Description
req module:api-controller~ExpressRequest

HTTP request

res module:api-controller~ExpressResponse

HTTP response

next function

Express callback

(async, inner) getSurveyParts(req, res, next)

Source:

Obtains HTML Form, XML model, and existing XML instance

Parameters:
Name Type Description
req module:api-controller~ExpressRequest

HTTP request

res module:api-controller~ExpressResponse

HTTP response

next function

Express callback