GitHub PullRequestReviewCommentEvent at 2014-03-12 21:37:44
Repository: fiware-orion
Actor: kzangeli
Payload: {"comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/10542519","id":10542519,"diff_hunk":"@@ -0,0 +1,60 @@\n+/*\n+*\n+* Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U\n+*\n+* This file is part of Orion Context Broker.\n+*\n+* Orion Context Broker is free software: you can redistribute it and/or\n+* modify it under the terms of the GNU Affero General Public License as\n+* published by the Free Software Foundation, either version 3 of the\n+* License, or (at your option) any later version.\n+*\n+* Orion Context Broker is distributed in the hope that it will be useful,\n+* but WITHOUT ANY WARRANTY; without even the implied warranty of\n+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n+* General Public License for more details.\n+*\n+* You should have received a copy of the GNU Affero General Public License\n+* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.\n+*\n+* For those usages not covered by this license please contact with\n+* fermin at tid dot es\n+*\n+* Author: TID Developer\n+*/\n+#include \"logMsg/logMsg.h\"\n+\n+#include \"convenience/UpdateContextAttributeRequest.h\"\n+#include \"convenienceMap/mapPutIndividualContextEntityAttribute.h\"\n+#include \"mongoBackend/MongoGlobal.h\"\n+#include \"mongoBackend/mongoUpdateContext.h\"\n+#include \"ngsi/ContextElementResponse.h\"\n+#include \"ngsi10/UpdateContextRequest.h\"\n+#include \"ngsi10/UpdateContextResponse.h\"\n+\n+\n+\n+/* ****************************************************************************\n+*\n+* mapPutIndividualContextEntityAttribute -\n+*/\n+HttpStatusCode mapPutIndividualContextEntityAttribute(std::string entityId, std::string attributeName, UpdateContextAttributeRequest* request, StatusCode* response)\n+{\n+  HttpStatusCode         ms;\n+  UpdateContextRequest   ucRequest;\n+  UpdateContextResponse  ucResponse;\n+  ContextElement         ce;\n+  ContextAttribute       attribute(attributeName, request->type, request->contextValue);\n+\n+  ce.entityId.fill(entityId, \"\", \"false\");\n+  ce.contextAttributeVector.push_back(&attribute);\n+\n+  ucRequest.contextElementVector.push_back(&ce);\n+  ucRequest.updateActionType.set(\"Update\");","path":"src/lib/convenienceMap/mapPutIndividualContextEntityAttribute.cpp","position":53,"original_position":53,"commit_id":"ee55f4f69843dafee1ee3802f1ad1f10db12f0a0","original_commit_id":"ee55f4f69843dafee1ee3802f1ad1f10db12f0a0","user":{"login":"kzangeli","id":5338380,"avatar_url":"https://gravatar.com/avatar/219ceb8e935c4c592687383e471b6310?d=https%3A%2F%2Fidenticons.github.com%2Fb7bc9a6bcce7219d0e524e517a968b35.png&r=x","gravatar_id":"219ceb8e935c4c592687383e471b6310","url":"https://api.github.com/users/kzangeli","html_url":"https://github.com/kzangeli","followers_url":"https://api.github.com/users/kzangeli/followers","following_url":"https://api.github.com/users/kzangeli/following{/other_user}","gists_url":"https://api.github.com/users/kzangeli/gists{/gist_id}","starred_url":"https://api.github.com/users/kzangeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzangeli/subscriptions","organizations_url":"https://api.github.com/users/kzangeli/orgs","repos_url":"https://api.github.com/users/kzangeli/repos","events_url":"https://api.github.com/users/kzangeli/events{/privacy}","received_events_url":"https://api.github.com/users/kzangeli/received_events","type":"User","site_admin":false},"body":"'Update' or 'Append'?\r\nI haven't checked with the bindings doc, I would just prefer to see 'Append' here instead.\r\nPerhaps that is for POST and not PUT ?\r\n","created_at":"2014-03-12T21:37:44Z","updated_at":"2014-03-12T21:37:44Z","html_url":"https://github.com/telefonicaid/fiware-orion/pull/272#discussion_r10542519","pull_request_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/272","_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/10542519"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/272#discussion_r10542519"},"pull_request":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/272"}}}}