◆ addQueryData()
CloudRequestEngine::addQueryData | ( | flowData, | |
queryData, | |||
allEvidence, | |||
evidence | |||
) |
Add query data to the evidence.
\r\n
constructor ({ resourceKey, licenseKey, baseURL, cloudRequestOrigin, requestClient })
Constructor for CloudRequestEngine. More...
| |
get | keysAndPropertiesFetched ()
Check if the keys and properties have been fetched. More...
|
fetchEvidenceKeysAndProperties (resolveCallback, rejectCallback)
Fetches evidence keys and properties data. More...
| |
ready ()
Function for testing if the cloud engine is ready Checks to see if properties and evidence keys have been fetched. More...
| |
processInternal (flowData)
Internal process for cloud engine Returns raw JSON as a "cloud" property in "cloud". More...
| |
getErrorMessages (responseBody)
Typically, cloud will return errors as JSON. More...
| |
getErrorsFromResponse (response)
Used to handle errors from http requests. More...
| |
fetchProperties ()
Internal process to fetch all the properties available under a resourcekey. More...
| |
propertiesTransform (properties) |
CloudRequestEngine::addQueryData | ( | flowData, | |
queryData, | |||
allEvidence, | |||
evidence | |||
) |
Add query data to the evidence.
CloudRequestEngine::constructor | ( | { resourceKey, licenseKey, baseURL, cloudRequestOrigin, requestClient } | ) |
Constructor for CloudRequestEngine.
CloudRequestEngine::fetchEvidenceKeysAndProperties | ( | resolveCallback, | |
rejectCallback | |||
) |
Fetches evidence keys and properties data.
This method asynchronously fetches evidence keys and properties required for the operation. It uses Promises to handle data retrieval and provides callback functions for success and failure scenarios.
CloudRequestEngine::fetchProperties | ( | ) |
Internal process to fetch all the properties available under a resourcekey.
CloudRequestEngine::getContent | ( | flowData | ) |
Generate the Content to send in the POST request.
The evidence keys e.g. 'query.' and 'header.' have an order of precedence. These are added to the evidence in reverse order, if there is conflict then the queryData value is overwritten. 'query.' evidence should take precedence over all other evidence. If there are evidence keys other than 'query.' that conflict then this is unexpected so a warning will be logged.
CloudRequestEngine::getData | ( | flowData | ) |
Internal function to get data from cloud service.
CloudRequestEngine::getErrorMessages | ( | responseBody | ) |
Typically, cloud will return errors as JSON.
However, transport level errors or other failures can result in responses that are plain text. This function handles these cases.
CloudRequestEngine::getErrorsFromResponse | ( | response | ) |
Used to handle errors from http requests.
CloudRequestEngine::getEvidenceKeys | ( | ) |
Internal function to get evidenceKeys used by cloud resourcekey.
CloudRequestEngine::getSelectedEvidence | ( | evidence, | |
type | |||
) |
Get evidence with specified prefix.
CloudRequestEngine::hasKeyPrefix | ( | itemKey, | |
prefix | |||
) |
Check that the key of a KeyValuePair has the given prefix.
get CloudRequestEngine::keysAndPropertiesFetched | ( | ) |
Check if the keys and properties have been fetched.
This computed property determines whether the keys of a 'flowElementProperties' object and the 'evidenceKeyFilter' array both have elements, indicating that the necessary data has been fetched and is ready for use.
CloudRequestEngine::processInternal | ( | flowData | ) |
Internal process for cloud engine Returns raw JSON as a "cloud" property in "cloud".
CloudRequestEngine::ready | ( | ) |
Function for testing if the cloud engine is ready Checks to see if properties and evidence keys have been fetched.