/* **************************************************************************** * * postQueryContext - */ std::string postQueryContext(ConnectionInfo* ciP, int components, std::vector<std::string> compV, ParseData* parseDataP) { QueryContextResponse qcr; std::string answer; ciP->httpStatusCode = mongoQueryContext(&parseDataP->qcr.res, &qcr); answer = qcr.render(QueryContext, ciP->outFormat, ""); return answer; }
/* **************************************************************************** * * QueryContextRequest::check - */ std::string QueryContextRequest::check(RequestType requestType, Format format, const std::string& indent, const std::string& predetectedError, int counter) { std::string res; QueryContextResponse response; if (predetectedError != "") { response.errorCode.fill(SccBadRequest, predetectedError); } else if (((res = entityIdVector.check(QueryContext, format, indent, predetectedError, 0)) != "OK") || ((res = attributeList.check(QueryContext, format, indent, predetectedError, 0)) != "OK") || ((res = restriction.check(QueryContext, format, indent, predetectedError, restrictions)) != "OK")) { response.errorCode.fill(SccBadRequest, res); } else return "OK"; return response.render(QueryContext, format, indent); }