◆ 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)
Properties transform. More...
| |
metaPropertyTransform (key, value)
Meta property transform. More...
| |
getData (flowData)
Internal function to get data from cloud service. More...
| |
getEvidenceKeys ()
Internal function to get evidenceKeys used by cloud resourcekey. More...
| |
getContent (flowData)
Generate the Content to send in the POST request. More...
| |
addQueryData (flowData, queryData, allEvidence, evidence)
Add query data to the evidence. More...
| |
getSelectedEvidence (evidence, type)
Get evidence with specified prefix. More...
| |
hasKeyPrefix (itemKey, prefix)
Check that the key of a KeyValuePair has the given prefix. More...
| |
Public Member Functions inherited from Engine | |
constructor ({ cache, restrictedProperties, dataFile }={}) | |
inCache (flowData)
Checks cache and returns cached result if found. More...
| |
process (flowData)
An engine's process function checks cache for an item (calling inCache) If found it returns the cached object If not found it runs the standard processInternal function and adds it to the cache (if a cache is present) More...
| |
refresh () | |
registerDataFile (dataFile)
Function to attach a DataFile to the engine and register it with a DataFileUpdateService if needed. More...
| |
Public Member Functions inherited from FlowElement | |
constructor ({ processInternal, dataKey, properties={}, evidenceKeyFilter }={})
Constructor for flowElement class. More...
| |
onRegistration (pipeline, flowElement)
Internal function to be called when a FlowElement is added to pipeline, runs through any registrationCallbacks on the FlowElement. More...
| |
ready ()
Function called to check if a FlowElement is ready Used when there are asynchronous initialisation steps. More...
| |
processInternal (flowData)
Internal process function for a particular flowElement called (via the flowElement.process() method) when flowData generated by a pipleline is processsed. More...
| |
process (flowData)
To allow actions to take place before and after a FlowElement's processInternal function runs, a process wrapper is run first. More...
| |
updateProperties ()
Call this function to update the properties meta database in all the pipelines this flowElement has been added to. More...
| |
getProperties ()
Get a flowElement's properties. More...
| |
_log (type, message)
Internal log. More...
|
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::metaPropertyTransform | ( | key, | |
value | |||
) |
Meta property transform.
CloudRequestEngine::processInternal | ( | flowData | ) |
Internal process for cloud engine Returns raw JSON as a "cloud" property in "cloud".
CloudRequestEngine::propertiesTransform | ( | properties | ) |
Properties transform.
CloudRequestEngine::ready | ( | ) |
Function for testing if the cloud engine is ready Checks to see if properties and evidence keys have been fetched.