|
ZOO-Project
|
#include "service_json.h"#include "json.h"#include "json_c_version.h"#include <errno.h>#include "json_tokener.h"#include "json_object.h"#include "stdlib.h"#include "mimetypes.h"#include "server_internal.h"#include "service_internal.h"#include <dirent.h>Functions | |
| maps * | jsonToMaps (json_object *pjoObj) |
| Convert a json object to maps. More... | |
| map * | jsonToMap (json_object *pjoObj) |
| Convert a json object to map. More... | |
| bool | jsonIsFalse (json_bool value) |
| Trivial verification, check if a json_bool is equal to FALSE. More... | |
| json_object * | mapToJson (map *pmMap) |
| Convert a map to a json object. More... | |
| json_object * | mapsToJson (maps *pmMap) |
| Convert a maps to a json object. More... | |
| json_object * | elementsToJson (elements *peElements) |
| Convert an elements to a json object. More... | |
| json_object * | serviceToJson (service *psService) |
| Convert an service to a json object. More... | |
| void | addDescription (map *pmElement, int iIndex, json_object *pjoOutput, json_object *pjoOutput1) |
| Add a description to one or two json objects using the abstract_file or abstract value. More... | |
| void | printAllowedRangesJ (maps *pmsConf, iotype *piotType, json_object *pjoProp) |
| Add Allowed Range properties to a json_object. More... | |
| void | printLiteralValueJ (maps *pmConf, map *pmType, map *pmContent, json_object *pjoSchema, const char *pccFieldName) |
| Add literal property depending on the dataType. More... | |
| void | printLiteralDataJ (maps *pmsConf, elements *peInput, json_object *pjoInput) |
| Add literalDataDomains property to a json_object. More... | |
| void | printComplexHref (maps *pmsConf, elements *peElement, json_object *pjoRes, bool isDefault, map *pmMaxSize) |
| Add support in the extended-schema for links object. More... | |
| json_object * | addArray (maps *m, elements *peElement) |
| Add support for type array in extended-schema. More... | |
| int | getDefinitionFromSchemas (maps *pmsConf, const char *pccName, json_object *pjoInput) |
| Get the data format definition from the schemas section, return 1 if found. More... | |
| void | printBoundingBoxJ (maps *pmsConf, elements *peInput, json_object *pjoInput) |
| Add basic schema definition for the BoundingBox type. More... | |
| void | printFormatJ1 (maps *m, iotype *piotType, json_object *pjoRes, bool isDefault, map *pmMaxSize) |
| Add schema property to a json_object (ComplexData) More... | |
| void | printFormatJ (maps *m, iotype *piotType, json_object *pjoRes, bool isDefault, map *pmMaxSize) |
| Add format properties to a json_object. More... | |
| void | printJAdditionalParameters (maps *pmsConf, map *pmMetaadta, json_object *doc) |
| Add additionalParameters property to a json_object. More... | |
| void | printJMetadata (maps *pmsConf, map *meta, json_object *doc) |
| Add metadata property to a json_object. More... | |
| void | printIOTypeJ (maps *pmsConf, const char *pccIo, elements *peInput, json_object *pjoInputs, service *psServ) |
| Add metadata properties to a json_object. More... | |
| void | printGetCapabilitiesForProcessJ (registry *reg, maps *pmsConf, void *doc0, void *nc0, service *serv) |
| Add all the capabilities properties to a json_object. More... | |
| json_object * | createExceptionJ (maps *pmsConf, map *s) |
| Produce an exception JSON object. More... | |
| void | printExceptionReportResponseJ (maps **pmsConf, map *s) |
| Print an OWS ExceptionReport Document and HTTP headers (when required) depending on the code. More... | |
| void | parseJLiteral (maps *pmsConf, json_object *req, elements *element, maps *output) |
| Parse LiteralData value. More... | |
| void | checkCorrespondingJFields (maps *pmsConf, json_object *req, maps *output) |
| Search field names used in the OGC API - Processes specification and replace them by old names from WPS. More... | |
| void | addToJRequests (maps **ppmsConf, const char *pccValue, const char *pccName) |
| Add a http request to the queue. More... | |
| void | parseAllKeys (json_object *req, maps *output) |
| Parse all keys in a json object except value, href and format. More... | |
| void | parseNestedProcess (maps *pmsConf, json_object *req, elements *element, maps *output, const char *pccName) |
| Parse a nested process json object. More... | |
| void | parseJComplex (maps *pmsConf, json_object *req, elements *element, maps *output, const char *pccName) |
| Parse ComplexData value. More... | |
| void | parseJBoundingBox (maps *pmsConf, json_object *pjoInput, elements *element, maps *output) |
| Parse BoundingBox value. More... | |
| void | returnBadRequestException (maps *pmsConf, elements *peInput) |
| Return an exception response with Status: "400 Bad Request" if inputs are not in the proper format. More... | |
| void | _parseJIOSingle1 (maps *pmsConf, elements *cio, maps **ioMaps, const char *ioType, const char *pccKey, json_object *val, maps *cMaps) |
| Parse a single input / output entity. More... | |
| void | _parseJIOSingle (maps *pmsConf, elements *cio, maps **ioMaps, const char *ioType, const char *pccKey, json_object *val, maps *cMaps) |
| Parse a single input / output entity. More... | |
| void | parseJIOSingle (maps *pmsConf, elements *ioElements, maps **ioMaps, const char *ioType, const char *pccKey, json_object *val) |
| Parse a single input / output entity that can be an array. More... | |
| void | parseJIO (maps *pmsConf, json_object *pjoInput, elements *ioElements, maps **ioMaps, const char *ioType) |
| Parse all the inputs / outputs entities. More... | |
| void | parseJRequest (maps *pmsConf, service *s, json_object *pjoRequestBody, map *pmRequestInputs, maps **inputs, maps **outputs) |
| Parse Json Request. More... | |
| json_object * | printJobStatus (maps **ppmsConf, char *pcJobId) |
| Print the jobs status info cf. More... | |
| bool | isFilteredPid (maps *pmsConf, const char *pccPid) |
| Verify if the process identified by pccPid is part of the processID filters, if any. More... | |
| bool | isFilteredDMM (maps *pmsConf, const char *pccPid) |
| Verify if the process identified by pccPid is part of the processID filters, if any. More... | |
| json_object * | printJobList (maps **ppmsConf) |
| Print the jobs list. More... | |
| void | filterJobByUser (maps *pmsConf, char **pcaClauseFinal, char *pcaClauseDate) |
| json_object * | printFilteredJobList (maps **ppmsConf, map *pmRequestInputs) |
| Print the filtered jobs list. More... | |
| json_object * | printJResult (maps **ppmsConf, service *s, maps *result, int iRes) |
| Print the result of an execution. More... | |
| void | outputSingleJsonLiteralData (maps *pmsConf, maps *pmsResult, json_object *pjoRes, const char *pccFieldName, char *pcValue) |
| Append required literal data output. More... | |
| void | outputSingleJsonComplexRes (maps *conf, maps *resu, json_object *pjoRes1, json_object *pjoRes3, char *pcValue, long lLen) |
| Append required field to Json objects for a complex output. More... | |
| json_object * | createALink (maps *conf, const char *rel, const char *type, const char *href) |
| Create a link object with ref, type and href. More... | |
| int | createNextLinks (maps *pmsConf, json_object *obj) |
| Create the next links. More... | |
| map * | fetchUsid (maps *pmsConf) |
| Fetch the current jobid (can be usid or gs_usid in the lenv section). More... | |
| void | createStatusLinksFromLogs (maps *pmsConf, json_object *pjoObj) |
| Detect if there is a _logs.cfg file associated with the execution. More... | |
| int | createStatusLinks (maps *pmsConf, int result, json_object *obj) |
| Create the status links. More... | |
| char * | json_getStatusFilePath (maps *pmsConf) |
| Get the status file path. More... | |
| char * | getResultPath (maps *pmsConf, char *jobId) |
| Get the result path. More... | |
| json_object * | parseJson (maps *pmsConf, char *myString) |
| Parse a json string. More... | |
| json_object * | json_readFile (maps *pmsConf, char *filePath) |
| Read a json file. More... | |
| void | json_getStatusAttributes (maps *pmsConf, map *pmSessId, json_object *pjoRes, int iStatus) |
| Fetch the statusFields attributes. More... | |
| json_object * | createStatus (maps *pmsConf, int status) |
| Create the json object for job status. More... | |
| int | createStatusFile (maps *pmsConf, int status) |
| Create the status file. More... | |
| int | json_getStatusFile (maps *pmsConf) |
| Create the status file. More... | |
| void | produceApiInfo (maps *pmsConf, json_object *pjoRes, json_object *pjoRes5) |
| Produce the JSON object for api info object. More... | |
| void | addResponse (const map *useContent, json_object *pjoRes, const map *pmSchema, const map *pmType, const char *code, const char *msg) |
| void | addParameter (maps *pmsConf, const char *oName, const char *fName, const char *in, json_object *pjoRes) |
| void | produceApiParameters (maps *pmsConf, json_object *pjoRes) |
| Produce the JSON object for api parameter. More... | |
| void | addSecurityScheme (maps *pmsConf, const char *fName, json_object *pjoRes) |
| Add a securityScheme to the OpenAPI components/securitySchemes object. More... | |
| void | produceApiSecuritySchemes (maps *pmsConf, json_object *pjoRes) |
| Produce the JSON object for api securitySchemes. More... | |
| void | produceApiSchemas (maps *pmsConf, json_object *pjoRes) |
| Produce the JSON object for api schemas. More... | |
| void | produceApiComponents (maps *pmsConf, json_object *pjoRes) |
| void | produceOperationId (maps *pmsConf, maps *pmsContent, int iIndex, json_object *pjoRes) |
| Generate an unique operationId attribute for a given endpoints. More... | |
| void | produceApi (maps *pmsConf, json_object *pjoRes) |
| Produce the JSON object for /api. More... | |
| void | produceRoot (maps *pmsConf, json_object *pjoRes) |
| Produce the JSON response for /. More... | |
| void | produceConformances (maps *pmsConf, json_object *pjoRes) |
| Produce the JSON response for /conformance. More... | |
| bool | serviceIsFiltered (maps *pmsConf, char *pcService, maps *pmsFilter) |
| Verify that a service name correspond to the a given process name. More... | |
| bool | serviceIsFilter (maps *pmsConf, char *pcService) |
| Verify that a service name correspond to the Deploy or Undeploy service name. More... | |
| void _parseJIOSingle | ( | maps * | pmsConf, |
| elements * | cio, | ||
| maps ** | ioMaps, | ||
| const char * | ioType, | ||
| const char * | pccKey, | ||
| json_object * | val, | ||
| maps * | cMaps | ||
| ) |
Parse a single input / output entity.
| pmsConf | the maps containing the settings of the main.cfg file |
| ioElements | the elements extracted from the zcfg |
| ioMaps | the produced maps containing inputs (or outputs) |
| ioType | the char* set to inputs or outputs |
| pccKey | char* the input/output name |
| val | json_object pointing to the input/output |
| cMaps | the outputed maps containing input (or output) metedata |
| void _parseJIOSingle1 | ( | maps * | pmsConf, |
| elements * | cio, | ||
| maps ** | ioMaps, | ||
| const char * | ioType, | ||
| const char * | pccKey, | ||
| json_object * | val, | ||
| maps * | cMaps | ||
| ) |
Parse a single input / output entity.
| pmsConf | the maps containing the settings of the main.cfg file |
| ioElements | the elements extracted from the zcfg |
| ioMaps | the produced maps containing inputs (or outputs) |
| ioType | the char* set to inputs or outputs |
| pccKey | char* the input/output name |
| val | json_object pointing to the input/output |
| cMaps | the outputed maps containing input (or output) metedata |
Add support for type array in extended-schema.
| m | the main configuration maps pointer |
| peElement | the elements pointer |
| void addDescription | ( | map * | pmElement, |
| int | iIndex, | ||
| json_object * | pjoOutput, | ||
| json_object * | pjoOutput1 | ||
| ) |
Add a description to one or two json objects using the abstract_file or abstract value.
In case an abstract_file is found, then the ZOO-Kernel will try to read the provided file path and use its content as the description value.
| pmElement | the current map to search for abstract_file/abstract field |
| iIndex | the index to use to fetch from the map array |
| pjoOutput | the first json object to add the description |
| pjoOutput1 | the second json object to add the description (optional) |
| void addParameter | ( | maps * | pmsConf, |
| const char * | oName, | ||
| const char * | fName, | ||
| const char * | in, | ||
| json_object * | pjoRes | ||
| ) |
| void addResponse | ( | const map * | useContent, |
| json_object * | pjoRes, | ||
| const map * | pmSchema, | ||
| const map * | pmType, | ||
| const char * | code, | ||
| const char * | msg | ||
| ) |
| void addSecurityScheme | ( | maps * | pmsConf, |
| const char * | fName, | ||
| json_object * | pjoRes | ||
| ) |
Add a securityScheme to the OpenAPI components/securitySchemes object.
| pmsConf | the maps containing the settings of the main.cfg file |
| fName | the key to add to the res json object |
| pjoRes | the json object to store the content |
| void addToJRequests | ( | maps ** | ppmsConf, |
| const char * | pccValue, | ||
| const char * | pccName | ||
| ) |
Add a http request to the queue.
| ppmsConf | the maps containing the settings of the main.cfg file |
| pccValue | the URL to fetch |
| pccName | the name of the input |
Search field names used in the OGC API - Processes specification and replace them by old names from WPS.
| pmsConf | the maps containing the settings of the main.cfg file |
| req | json_object to fetch attributes from |
| output | the maps to store metadata informations as a maps |
| json_object* createALink | ( | maps * | conf, |
| const char * | rel, | ||
| const char * | type, | ||
| const char * | href | ||
| ) |
Create a link object with ref, type and href.
| conf | maps pointer to the main configuration maps |
| rel | char pointer defining the rel attribute |
| type | char pointer defining the type attribute |
| href | char pointer defining the href attribute |
Produce an exception JSON object.
| pmsConf | the maps containing the settings of the main.cfg file |
| s | the map containing the text,code,locator keys (or a map array of the same keys) |
| int createNextLinks | ( | maps * | pmsConf, |
| json_object * | obj | ||
| ) |
Create the next links.
| pmsConf | the maps containing the settings of the main.cfg file |
| result | an integer (>0 for adding the /result link) |
| obj | the JSON object pointer to add the links to |
| json_object* createStatus | ( | maps * | pmsConf, |
| int | status | ||
| ) |
Create the json object for job status.
| pmsConf | the conf maps containing the main.cfg settings |
| status | integer |
| int createStatusFile | ( | maps * | pmsConf, |
| int | status | ||
| ) |
Create the status file.
| pmsConf | the maps containing the settings of the main.cfg file |
| status | an integer (SERVICE_ACCEPTED,SERVICE_STARTED...) |
| int createStatusLinks | ( | maps * | pmsConf, |
| int | result, | ||
| json_object * | obj | ||
| ) |
Create the status links.
| pmsConf | the maps containing the settings of the main.cfg file |
| result | an integer (>0 for adding the /result link) |
| obj | the JSON object pointer to add the links to |
| void createStatusLinksFromLogs | ( | maps * | pmsConf, |
| json_object * | pjoObj | ||
| ) |
Detect if there is a _logs.cfg file associated with the execution.
If yes, add the links defined in the section to the standard links associated with a job statusInfo.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoObj | the JSON object pointer to add the links to |
| json_object* elementsToJson | ( | elements * | peElements | ) |
Convert an elements to a json object.
| peElements | the elements pointer to be converted into a json object |
Fetch the current jobid (can be usid or gs_usid in the lenv section).
| pmsConf | the maps containing the settings of the main.cfg file |
| void filterJobByUser | ( | maps * | pmsConf, |
| char ** | pcaClauseFinal, | ||
| char * | pcaClauseDate | ||
| ) |
| int getDefinitionFromSchemas | ( | maps * | pmsConf, |
| const char * | pccName, | ||
| json_object * | pjoInput | ||
| ) |
Get the data format definition from the schemas section, return 1 if found.
| pmsConf | the main configuration maps pointer |
| pccName | the name of the data format to search for |
| char* getResultPath | ( | maps * | pmsConf, |
| char * | jobId | ||
| ) |
Get the result path.
| pmsConf | the conf maps containing the main.cfg settings |
| jobId | the job identifier |
| bool isFilteredDMM | ( | maps * | pmsConf, |
| const char * | pccPid | ||
| ) |
Verify if the process identified by pccPid is part of the processID filters, if any.
| pmsConf | the maps containing the settings of the main.cfg file |
| pccPid | the const char pointer to the processID |
| bool isFilteredPid | ( | maps * | pmsConf, |
| const char * | pccPid | ||
| ) |
Verify if the process identified by pccPid is part of the processID filters, if any.
| pmsConf | the maps containing the settings of the main.cfg file |
| pccPid | the const char pointer to the processID |
Fetch the statusFields attributes.
| pmsConf | the conf maps containing the main.cfg settings |
| pmSessId | the map pointer to the session id |
| pjoRes | the object to store metadata informations |
| iStatus | integer of the current execution status |
| int json_getStatusFile | ( | maps * | pmsConf | ) |
Create the status file.
| pmsConf | the maps containing the settings of the main.cfg file |
| char* json_getStatusFilePath | ( | maps * | pmsConf | ) |
Get the status file path.
| pmsConf | the maps containing the settings of the main.cfg file |
| json_object* json_readFile | ( | maps * | pmsConf, |
| char * | filePath | ||
| ) |
Read a json file.
| pmsConf | the conf maps containing the main.cfg settings @praam filePath the file path to read |
| bool jsonIsFalse | ( | json_bool | value | ) |
Trivial verification, check if a json_bool is equal to FALSE.
| jbValue | json_bool value to verify if null |
| map* jsonToMap | ( | json_object * | pjoObj | ) |
Convert a json object to map.
| pjoObj | the json object to convert |
| maps* jsonToMaps | ( | json_object * | pjoObj | ) |
Convert a json object to maps.
| pjoObj | the json object to convert |
| json_object* mapsToJson | ( | maps * | pmMap | ) |
Convert a maps to a json object.
| pmMap | the maps to be converted into json object |
| json_object* mapToJson | ( | map * | pmMap | ) |
Convert a map to a json object.
| pmMap | the map to be converted into json object |
| void outputSingleJsonComplexRes | ( | maps * | conf, |
| maps * | resu, | ||
| json_object * | pjoRes1, | ||
| json_object * | pjoRes3, | ||
| char * | pcValue, | ||
| long | lLen | ||
| ) |
Append required field to Json objects for a complex output.
| conf | maps pointer to the main configuration maps |
| resu | maps pointer to the output |
| pjoRes1 | json_object pointer to which the value field should be added |
| pjoRes3 | json_object pointer to the format object associated with pjoRes1 |
| pcValue | char pointer to the value to be allocated |
| lLen | length of pcValue |
| void outputSingleJsonLiteralData | ( | maps * | pmsConf, |
| maps * | pmsResult, | ||
| json_object * | pjoRes, | ||
| const char * | pccFieldName, | ||
| char * | pcValue | ||
| ) |
Append required literal data output.
| pmsConf | maps pointer to the main configuration maps |
| pmsResult | maps pointer to the output |
| pjoRes | json_object pointer to which the field should be added |
| pccFieldName | the field name to be added |
| pcValue | char pointer to the value |
| void parseAllKeys | ( | json_object * | req, |
| maps * | output | ||
| ) |
Parse all keys in a json object except value, href and format.
| req | json_object pointing to the input/output |
| output | the maps to set current json structure |
| void parseJBoundingBox | ( | maps * | pmsConf, |
| json_object * | pjoInput, | ||
| elements * | element, | ||
| maps * | output | ||
| ) |
Parse BoundingBox value.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoInput | json_object pointing to the input/output |
| element | the metadata |
| output | the maps to set current json structure |
| void parseJComplex | ( | maps * | pmsConf, |
| json_object * | req, | ||
| elements * | element, | ||
| maps * | output, | ||
| const char * | pccName | ||
| ) |
Parse ComplexData value.
| pmsConf | the maps containing the settings of the main.cfg file |
| req | json_object pointing to the input/output |
| element | the metadata |
| output | the maps to set current json structure |
| pccName | the name of the request from http_requests |
| void parseJIO | ( | maps * | pmsConf, |
| json_object * | pjoInput, | ||
| elements * | ioElements, | ||
| maps ** | ioMaps, | ||
| const char * | ioType | ||
| ) |
Parse all the inputs / outputs entities.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoInput | json_object pointing to the input/output |
| ioElements | the elements extracted from the zcfg |
| ioMaps | the produced maps containing inputs (or outputs) |
| ioType | the char* set to inputs or outputs |
| void parseJIOSingle | ( | maps * | pmsConf, |
| elements * | ioElements, | ||
| maps ** | ioMaps, | ||
| const char * | ioType, | ||
| const char * | pccKey, | ||
| json_object * | val | ||
| ) |
Parse a single input / output entity that can be an array.
| pmsConf | the maps containing the settings of the main.cfg file |
| ioElements | the elements extracted from the zcfg |
| ioMaps | the produced maps containing inputs (or outputs) |
| ioType | the char* set to inputs or outputs |
| pccKey | char* the input/output name |
| val | json_object pointing to the input/output |
Parse LiteralData value.
| pmsConf | the maps containing the settings of the main.cfg file |
| req | json_object pointing to the input/output |
| element | |
| output | the maps to set current json structure |
| void parseJRequest | ( | maps * | pmsConf, |
| service * | s, | ||
| json_object * | pjoRequestBody, | ||
| map * | pmRequestInputs, | ||
| maps ** | inputs, | ||
| maps ** | outputs | ||
| ) |
Parse Json Request.
| pmsConf | the maps containing the settings of the main.cfg file |
| s | the current service metadata |
| pjoRequestBody | the JSON object of the request body |
| pmRequestInputs | the produced maps |
| inputs | the produced maps |
| outputs | the produced maps |
| json_object* parseJson | ( | maps * | pmsConf, |
| char * | myString | ||
| ) |
Parse a json string.
| pmsConf | the conf maps containing the main.cfg settings |
| myString | the string containing the json content |
| void parseNestedProcess | ( | maps * | pmsConf, |
| json_object * | req, | ||
| elements * | element, | ||
| maps * | output, | ||
| const char * | pccName | ||
| ) |
Parse a nested process json object.
| pmsConf | the maps containing the settings of the main.cfg file |
| req | json_object pointing to the input/output |
| element | the metadata for this input |
| output | the maps to set current json structure |
| pccName | the name of the request from http_requests |
Add Allowed Range properties to a json_object.
| pmsConf | the main configuration maps pointer |
| piotType | the iotype pointer |
| pjoProp | the json_object pointer to add the allowed range properties |
Add basic schema definition for the BoundingBox type.
| pmsConf | the main configuration maps pointer |
| peInput | the elements pointing to an input/output |
| pjoInput | the json_object pointer used to store the schema definition |
| void printComplexHref | ( | maps * | pmsConf, |
| elements * | peElement, | ||
| json_object * | pjoRes, | ||
| bool | isDefault, | ||
| map * | pmMaxSize | ||
| ) |
Add support in the extended-schema for links object.
| pmsConf | the main configuration maps pointer |
| peElement | the elements pointer |
| pjoRes | the json_object pointer on the array |
| isDefault | boolean, try if it is the default value |
| pmMaxSize | map pointer (not used) |
Print an OWS ExceptionReport Document and HTTP headers (when required) depending on the code.
Set hasPrinted value to true in the [lenv] section.
| pmsConf | the maps containing the settings of the main.cfg file |
| s | the map containing the text,code,locator keys (or a map array of the same keys) |
Print the filtered jobs list.
| ppmsConf | the maps containing the settings of the main.cfg file |
| void printFormatJ | ( | maps * | m, |
| iotype * | piotType, | ||
| json_object * | pjoRes, | ||
| bool | isDefault, | ||
| map * | pmMaxSize | ||
| ) |
Add format properties to a json_object.
| m | the main configuration maps pointer |
| piotType | the current iotype pointer |
| pjoRes | the json_object pointer to add the properties to |
| isDefault | boolean specifying if the currrent iotype is default |
| pmMaxSize | a map pointer to the maximumMegabytes param defined in the zcfg file for this input/output |
| void printFormatJ1 | ( | maps * | m, |
| iotype * | piotType, | ||
| json_object * | pjoRes, | ||
| bool | isDefault, | ||
| map * | pmMaxSize | ||
| ) |
Add schema property to a json_object (ComplexData)
| m | the main configuration maps pointer |
| piotType | the current iotype pointer |
| pjoRes | the json_object pointer to add the properties to |
| isDefault | boolean specifying if the currrent iotype is default |
| pmMaxSize | a map pointer to the maximumMegabytes param defined in the zcfg file for this input/output |
| void printGetCapabilitiesForProcessJ | ( | registry * | reg, |
| maps * | pmsConf, | ||
| void * | doc0, | ||
| void * | nc0, | ||
| service * | serv | ||
| ) |
Add all the capabilities properties to a json_object.
| reg | the registry pointer |
| pmsConf | the main configuration maps pointer |
| doc0 | the void (json_object) pointer to add the property to |
| nc0 | the void (json_object) pointer to add the property to |
| serv | the service pointer to extract the metadata from |
| void printIOTypeJ | ( | maps * | pmsConf, |
| const char * | pccIo, | ||
| elements * | peInput, | ||
| json_object * | pjoInputs, | ||
| service * | psServ | ||
| ) |
Add metadata properties to a json_object.
| pmsConf | the main configuration maps pointer |
| pccIo | a string "input" or "output" |
| peInput | an elements pointer to the current input/output |
| pjoInputs | the json_object pointer to add the property to |
| psServ | the service pointer to extract the metadata from |
Add additionalParameters property to a json_object.
| pmsConf | the main configuration maps pointer |
| pmMetaadta | a map pointer to the current metadata informations |
| doc | the json_object pointer to add the property to |
Add metadata property to a json_object.
| pmsConf | the main configuration maps pointer |
| meta | a map pointer to the current metadata informations |
| doc | the json_object pointer to add the property to |
| json_object* printJobList | ( | maps ** | ppmsConf | ) |
Print the jobs list.
| ppmsConf | the maps containing the settings of the main.cfg file |
| json_object* printJobStatus | ( | maps ** | ppmsConf, |
| char * | pcJobId | ||
| ) |
Print the jobs status info cf.
| pmsConf | the maps containing the settings of the main.cfg file |
| pcJobId | the char pointer to the jobid |
Print the result of an execution.
| ppmsConf | the maps containing the settings of the main.cfg file |
| s | service pointer to metadata |
| result | outputs of the service |
| iRes | the status of execution SERVICE_FAILED/SERVICE_SUCCEEDED |
Add literalDataDomains property to a json_object.
| pmsConf | the main configuration maps pointer |
| peInput | the elements pointer |
| pjoInput | the json_object pointer to add the literalDataDomains property |
| void printLiteralValueJ | ( | maps * | pmConf, |
| map * | pmType, | ||
| map * | pmContent, | ||
| json_object * | pjoSchema, | ||
| const char * | pccFieldName | ||
| ) |
Add literal property depending on the dataType.
| pmConf | the main configuration maps pointer |
| pmType | the dataType map pointer |
| pmContent | the iotype content map pointer |
| pjoSchema | the json_object pointer to add the value |
| pccFieldName | the field name string |
| void produceApi | ( | maps * | pmsConf, |
| json_object * | pjoRes | ||
| ) |
Produce the JSON object for /api.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoRes | the JSON object to populate |
| void produceApiComponents | ( | maps * | pmsConf, |
| json_object * | pjoRes | ||
| ) |
| void produceApiInfo | ( | maps * | pmsConf, |
| json_object * | pjoRes, | ||
| json_object * | pjoRes5 | ||
| ) |
Produce the JSON object for api info object.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoRes | the JSON object for the api info |
| void produceApiParameters | ( | maps * | pmsConf, |
| json_object * | pjoRes | ||
| ) |
Produce the JSON object for api parameter.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoRes | the JSON object to populate with the parameters |
| void produceApiSchemas | ( | maps * | pmsConf, |
| json_object * | pjoRes | ||
| ) |
Produce the JSON object for api schemas.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoRes | the JSON object to populate with the parameters |
| void produceApiSecuritySchemes | ( | maps * | pmsConf, |
| json_object * | pjoRes | ||
| ) |
Produce the JSON object for api securitySchemes.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoRes | the JSON object to populate with the parameters |
| void produceConformances | ( | maps * | pmsConf, |
| json_object * | pjoRes | ||
| ) |
Produce the JSON response for /conformance.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoRes | the JSON object to populate |
Generate an unique operationId attribute for a given endpoints.
| pmsConf | maps pointing to the main confif maps |
| pmsContent | the maps containing endpoint's metadata information |
| iIndex | the index for map array, 0 otherwise |
| pjoRes | the json object to store the operationId attribute |
| void produceRoot | ( | maps * | pmsConf, |
| json_object * | pjoRes | ||
| ) |
Produce the JSON response for /.
| pmsConf | the maps containing the settings of the main.cfg file |
| pjoRes | the JSON object to populate |
Return an exception response with Status: "400 Bad Request" if inputs are not in the proper format.
| pmsConf | the maps containing the settings of the main.cfg file |
| peInput | the input causing the issue |
| bool serviceIsFilter | ( | maps * | pmsConf, |
| char * | pcService | ||
| ) |
Verify that a service name correspond to the Deploy or Undeploy service name.
| pmsConf | the main configuration maps pointer |
| pcService | the service name |
Verify that a service name correspond to the a given process name.
| pmsConf | the main configuration maps pointer |
| pcService | the service name to verify |
| pmsFilter | the maps pointer containing the process name |
| json_object* serviceToJson | ( | service * | psService | ) |
Convert an service to a json object.
| psService | the service pointer to be converted into a json object |
1.8.17