{"action":"created","comment":{"url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments/39966431","id":39966431,"diff_hunk":"@@ -0,0 +1,78 @@\n+/*\n+ * Copyright 2015 Red Hat, Inc. and/or its affiliates\n+ * and other contributors as indicated by the @author tags.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.hawkular.cmdgw.ws.command.feed;\n+\n+import java.util.Collections;\n+import java.util.Map;\n+\n+import org.hawkular.bus.common.BasicMessage;\n+import org.hawkular.bus.common.BasicMessageWithExtraData;\n+import org.hawkular.bus.common.BinaryData;\n+import org.hawkular.bus.common.ConnectionContextFactory;\n+import org.hawkular.bus.common.Endpoint;\n+import org.hawkular.bus.common.MessageProcessor;\n+import org.hawkular.bus.common.producer.ProducerConnectionContext;\n+import org.hawkular.cmdgw.api.ExportJDRResponse;\n+import org.hawkular.cmdgw.ws.Constants;\n+import org.hawkular.cmdgw.ws.MsgLogger;\n+import org.hawkular.cmdgw.ws.command.Command;\n+import org.hawkular.cmdgw.ws.command.CommandContext;\n+\n+/**\n+ * @author Juraci Paixão Kröhling\n+ */\n+public class ExportJDRResponseCommand implements Command<ExportJDRResponse, BasicMessage> {\n+    public static final Class<ExportJDRResponse> REQUEST_CLASS = ExportJDRResponse.class;\n+\n+    @Override\n+    public BasicMessageWithExtraData<BasicMessage> execute(ExportJDRResponse response, BinaryData binaryData,\n+                                                           CommandContext context)\n+            throws Exception {\n+\n+        String status = response.getStatus();\n+        String msg = response.getMessage();\n+        MsgLogger.LOG.infof(\"Export JDR completed. Status=[%s], Message=[%s]\", status, msg);\n+\n+        // determine what UI client needs to be sent the message\n+        String uiClientId;\n+\n+        // TODO: how do we get this?","path":"hawkular-command-gateway-war/src/main/java/org/hawkular/cmdgw/ws/command/feed/ExportJDRResponseCommand.java","position":53,"original_position":53,"commit_id":"8459e7d44ffff0ba8f709b47f93686e44914140a","original_commit_id":"8459e7d44ffff0ba8f709b47f93686e44914140a","user":{"login":"pilhuhn","id":208246,"avatar_url":"https://avatars.githubusercontent.com/u/208246?v=3","gravatar_id":"","url":"https://api.github.com/users/pilhuhn","html_url":"https://github.com/pilhuhn","followers_url":"https://api.github.com/users/pilhuhn/followers","following_url":"https://api.github.com/users/pilhuhn/following{/other_user}","gists_url":"https://api.github.com/users/pilhuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/pilhuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilhuhn/subscriptions","organizations_url":"https://api.github.com/users/pilhuhn/orgs","repos_url":"https://api.github.com/users/pilhuhn/repos","events_url":"https://api.github.com/users/pilhuhn/events{/privacy}","received_events_url":"https://api.github.com/users/pilhuhn/received_events","type":"User","site_admin":false},"body":"Isn't the resolution of this TODO the code below?","created_at":"2015-09-21T12:53:17Z","updated_at":"2015-09-21T12:53:17Z","html_url":"https://github.com/hawkular/hawkular-command-gateway/pull/12#discussion_r39966431","pull_request_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments/39966431"},"html":{"href":"https://github.com/hawkular/hawkular-command-gateway/pull/12#discussion_r39966431"},"pull_request":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12","id":45541969,"html_url":"https://github.com/hawkular/hawkular-command-gateway/pull/12","diff_url":"https://github.com/hawkular/hawkular-command-gateway/pull/12.diff","patch_url":"https://github.com/hawkular/hawkular-command-gateway/pull/12.patch","issue_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/12","number":12,"state":"open","locked":false,"title":"HAWKULAR-609 - Implemented the 'Export JDR' operation.","user":{"login":"jpkrohling","id":13387,"avatar_url":"https://avatars.githubusercontent.com/u/13387?v=3","gravatar_id":"","url":"https://api.github.com/users/jpkrohling","html_url":"https://github.com/jpkrohling","followers_url":"https://api.github.com/users/jpkrohling/followers","following_url":"https://api.github.com/users/jpkrohling/following{/other_user}","gists_url":"https://api.github.com/users/jpkrohling/gists{/gist_id}","starred_url":"https://api.github.com/users/jpkrohling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpkrohling/subscriptions","organizations_url":"https://api.github.com/users/jpkrohling/orgs","repos_url":"https://api.github.com/users/jpkrohling/repos","events_url":"https://api.github.com/users/jpkrohling/events{/privacy}","received_events_url":"https://api.github.com/users/jpkrohling/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-21T12:22:36Z","updated_at":"2015-09-21T12:53:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e139b1f3d973fe711477482c304e395d7ed49d8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12/commits","review_comments_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12/comments","review_comment_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/12/comments","statuses_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/statuses/8459e7d44ffff0ba8f709b47f93686e44914140a","head":{"label":"jpkrohling:HAWKULAR-609-ExportJDR","ref":"HAWKULAR-609-ExportJDR","sha":"8459e7d44ffff0ba8f709b47f93686e44914140a","user":{"login":"jpkrohling","id":13387,"avatar_url":"https://avatars.githubusercontent.com/u/13387?v=3","gravatar_id":"","url":"https://api.github.com/users/jpkrohling","html_url":"https://github.com/jpkrohling","followers_url":"https://api.github.com/users/jpkrohling/followers","following_url":"https://api.github.com/users/jpkrohling/following{/other_user}","gists_url":"https://api.github.com/users/jpkrohling/gists{/gist_id}","starred_url":"https://api.github.com/users/jpkrohling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpkrohling/subscriptions","organizations_url":"https://api.github.com/users/jpkrohling/orgs","repos_url":"https://api.github.com/users/jpkrohling/repos","events_url":"https://api.github.com/users/jpkrohling/events{/privacy}","received_events_url":"https://api.github.com/users/jpkrohling/received_events","type":"User","site_admin":false},"repo":{"id":42457490,"name":"hawkular-command-gateway","full_name":"jpkrohling/hawkular-command-gateway","owner":{"login":"jpkrohling","id":13387,"avatar_url":"https://avatars.githubusercontent.com/u/13387?v=3","gravatar_id":"","url":"https://api.github.com/users/jpkrohling","html_url":"https://github.com/jpkrohling","followers_url":"https://api.github.com/users/jpkrohling/followers","following_url":"https://api.github.com/users/jpkrohling/following{/other_user}","gists_url":"https://api.github.com/users/jpkrohling/gists{/gist_id}","starred_url":"https://api.github.com/users/jpkrohling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpkrohling/subscriptions","organizations_url":"https://api.github.com/users/jpkrohling/orgs","repos_url":"https://api.github.com/users/jpkrohling/repos","events_url":"https://api.github.com/users/jpkrohling/events{/privacy}","received_events_url":"https://api.github.com/users/jpkrohling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpkrohling/hawkular-command-gateway","description":"A WebSockets Gateway that both Hawkular UI and Hawkular Agent use for bidirectional communication.","fork":true,"url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway","forks_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/forks","keys_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/teams","hooks_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/hooks","issue_events_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/events","assignees_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/tags","blobs_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/languages","stargazers_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/stargazers","contributors_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/contributors","subscribers_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/subscribers","subscription_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/subscription","commits_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/merges","archive_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/downloads","issues_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/labels{/name}","releases_url":"https://api.github.com/repos/jpkrohling/hawkular-command-gateway/releases{/id}","created_at":"2015-09-14T15:31:00Z","updated_at":"2015-09-14T15:31:01Z","pushed_at":"2015-09-21T11:58:44Z","git_url":"git://github.com/jpkrohling/hawkular-command-gateway.git","ssh_url":"git@github.com:jpkrohling/hawkular-command-gateway.git","clone_url":"https://github.com/jpkrohling/hawkular-command-gateway.git","svn_url":"https://github.com/jpkrohling/hawkular-command-gateway","homepage":null,"size":765,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hawkular:master","ref":"master","sha":"d1ec984046161bb9c287edada74a633058bade7f","user":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"repo":{"id":41916848,"name":"hawkular-command-gateway","full_name":"hawkular/hawkular-command-gateway","owner":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hawkular/hawkular-command-gateway","description":"A WebSockets Gateway that both Hawkular UI and Hawkular Agent use for bidirectional communication.","fork":false,"url":"https://api.github.com/repos/hawkular/hawkular-command-gateway","forks_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/forks","keys_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/teams","hooks_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/hooks","issue_events_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/events","assignees_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/tags","blobs_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/languages","stargazers_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/stargazers","contributors_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/contributors","subscribers_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/subscribers","subscription_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/subscription","commits_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/merges","archive_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/downloads","issues_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/labels{/name}","releases_url":"https://api.github.com/repos/hawkular/hawkular-command-gateway/releases{/id}","created_at":"2015-09-04T13:18:56Z","updated_at":"2015-09-04T15:45:58Z","pushed_at":"2015-09-21T12:22:36Z","git_url":"git://github.com/hawkular/hawkular-command-gateway.git","ssh_url":"git@github.com:hawkular/hawkular-command-gateway.git","clone_url":"https://github.com/hawkular/hawkular-command-gateway.git","svn_url":"https://github.com/hawkular/hawkular-command-gateway","homepage":null,"size":931,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12"},"html":{"href":"https://github.com/hawkular/hawkular-command-gateway/pull/12"},"issue":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/12"},"comments":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/hawkular/hawkular-command-gateway/statuses/8459e7d44ffff0ba8f709b47f93686e44914140a"}}}}