{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/comments/24218006","id":24218006,"diff_hunk":"@@ -200,4 +209,144 @@ public String toString() {\n       return sb.toString();\n     }\n   }\n+\n+  /**\n+   * Represents ID of a Notification feed.\n+   */\n+  public static class NotificationFeed {\n+\n+    private final Namespace namespace;\n+    private final String category;\n+    private final String name;\n+\n+    private final String description;\n+\n+    /**\n+     * {@link NotificationFeed} object from an id in the form of \"namespace.category.name\".\n+     *\n+     * @param id id of the notification feed to build\n+     * @return a {@link NotificationFeed} object which id is the same as {@code id}\n+     * @throws IllegalArgumentException when the id doesn't match a valid feed id\n+     */\n+    public static NotificationFeed fromId(String id) {\n+      String[] idParts = id.split(\"\\\\.\");\n+      if (idParts.length != 3) {\n+        throw new IllegalArgumentException(String.format(\"Id %s is not a valid feed id.\", id));\n+      }\n+      return new NotificationFeed(idParts[0], idParts[1], idParts[2], \"\");\n+    }\n+\n+    private NotificationFeed(String namespace, String category, String name, String description) {\n+      Preconditions.checkArgument(namespace != null && !namespace.isEmpty(),\n+                                  \"Namespace value cannot be null or empty.\");\n+      Preconditions.checkArgument(category != null && !category.isEmpty(), \"Category value cannot be null or empty.\");\n+      Preconditions.checkArgument(name != null && !name.isEmpty(), \"Name value cannot be null or empty.\");\n+      Preconditions.checkArgument(isId(namespace) && isId(category) && isId(name),\n+                                  \"Namespace, category or name has a wrong format.\");\n+\n+      this.namespace = Namespace.from(namespace);\n+      this.category = category;\n+      this.name = name;\n+      this.description = description;\n+    }\n+\n+    public String getCategory() {\n+      return category;\n+    }\n+\n+    public String getId() {","path":"cdap-proto/src/main/java/co/cask/cdap/proto/Id.java","position":72,"original_position":72,"commit_id":"6f5cf498d3ea217c098e6072bf36c0280815ce68","original_commit_id":"6f5cf498d3ea217c098e6072bf36c0280815ce68","user":{"login":"bdmogal","id":3895099,"avatar_url":"https://avatars.githubusercontent.com/u/3895099?v=3","gravatar_id":"","url":"https://api.github.com/users/bdmogal","html_url":"https://github.com/bdmogal","followers_url":"https://api.github.com/users/bdmogal/followers","following_url":"https://api.github.com/users/bdmogal/following{/other_user}","gists_url":"https://api.github.com/users/bdmogal/gists{/gist_id}","starred_url":"https://api.github.com/users/bdmogal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdmogal/subscriptions","organizations_url":"https://api.github.com/users/bdmogal/orgs","repos_url":"https://api.github.com/users/bdmogal/repos","events_url":"https://api.github.com/users/bdmogal/events{/privacy}","received_events_url":"https://api.github.com/users/bdmogal/received_events","type":"User","site_admin":false},"body":"Ok.","created_at":"2015-02-06T01:58:26Z","updated_at":"2015-02-06T01:58:26Z","html_url":"https://github.com/caskdata/cdap/pull/1219#discussion_r24218006","pull_request_url":"https://api.github.com/repos/caskdata/cdap/pulls/1219","_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments/24218006"},"html":{"href":"https://github.com/caskdata/cdap/pull/1219#discussion_r24218006"},"pull_request":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1219"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/1219","id":28587797,"html_url":"https://github.com/caskdata/cdap/pull/1219","diff_url":"https://github.com/caskdata/cdap/pull/1219.diff","patch_url":"https://github.com/caskdata/cdap/pull/1219.patch","issue_url":"https://api.github.com/repos/caskdata/cdap/issues/1219","number":1219,"state":"open","locked":false,"title":"Namespaced notification feeds","user":{"login":"jguery","id":3600810,"avatar_url":"https://avatars.githubusercontent.com/u/3600810?v=3","gravatar_id":"","url":"https://api.github.com/users/jguery","html_url":"https://github.com/jguery","followers_url":"https://api.github.com/users/jguery/followers","following_url":"https://api.github.com/users/jguery/following{/other_user}","gists_url":"https://api.github.com/users/jguery/gists{/gist_id}","starred_url":"https://api.github.com/users/jguery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jguery/subscriptions","organizations_url":"https://api.github.com/users/jguery/orgs","repos_url":"https://api.github.com/users/jguery/repos","events_url":"https://api.github.com/users/jguery/events{/privacy}","received_events_url":"https://api.github.com/users/jguery/received_events","type":"User","site_admin":false},"body":"This PR contains APIs changes - although only internal APIs.\r\nNamely, we used to have:\r\n - PUT/DELETE/GET v3/feeds/{feed-id} with feed-id = [namespace].[category].[name]\r\n\r\nWe now have:\r\n - PUT/DELETE/GET v3/namespaces/{namespace}/feeds/categories/{category}/names/{name}\r\n\r\nBuild: https://builds.cask.co/browse/CDAP-DUT682","created_at":"2015-02-03T20:52:28Z","updated_at":"2015-02-06T01:58:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"045b095467899c726708499fd9d24df24f23efb8","assignee":null,"milestone":{"url":"https://api.github.com/repos/caskdata/cdap/milestones/3","labels_url":"https://api.github.com/repos/caskdata/cdap/milestones/3/labels","id":944584,"number":3,"title":"2.8.0","description":null,"creator":{"login":"jwang47","id":1084704,"avatar_url":"https://avatars.githubusercontent.com/u/1084704?v=3","gravatar_id":"","url":"https://api.github.com/users/jwang47","html_url":"https://github.com/jwang47","followers_url":"https://api.github.com/users/jwang47/followers","following_url":"https://api.github.com/users/jwang47/following{/other_user}","gists_url":"https://api.github.com/users/jwang47/gists{/gist_id}","starred_url":"https://api.github.com/users/jwang47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwang47/subscriptions","organizations_url":"https://api.github.com/users/jwang47/orgs","repos_url":"https://api.github.com/users/jwang47/repos","events_url":"https://api.github.com/users/jwang47/events{/privacy}","received_events_url":"https://api.github.com/users/jwang47/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":11,"state":"open","created_at":"2015-01-21T01:15:14Z","updated_at":"2015-02-06T01:47:25Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/caskdata/cdap/pulls/1219/commits","review_comments_url":"https://api.github.com/repos/caskdata/cdap/pulls/1219/comments","review_comment_url":"https://api.github.com/repos/caskdata/cdap/pulls/comments/{number}","comments_url":"https://api.github.com/repos/caskdata/cdap/issues/1219/comments","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/6f5cf498d3ea217c098e6072bf36c0280815ce68","head":{"label":"caskdata:feature/feeds-namespaces","ref":"feature/feeds-namespaces","sha":"6f5cf498d3ea217c098e6072bf36c0280815ce68","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments/{number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","created_at":"2014-08-02T09:00:10Z","updated_at":"2015-02-05T22:34:56Z","pushed_at":"2015-02-06T01:46:39Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":709905,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":23,"default_branch":"develop"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"cf04205f10855c88340af48c4ffca7161e591693","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments/{number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","created_at":"2014-08-02T09:00:10Z","updated_at":"2015-02-05T22:34:56Z","pushed_at":"2015-02-06T01:46:39Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":709905,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":7,"forks":8,"open_issues":7,"watchers":23,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1219"},"html":{"href":"https://github.com/caskdata/cdap/pull/1219"},"issue":{"href":"https://api.github.com/repos/caskdata/cdap/issues/1219"},"comments":{"href":"https://api.github.com/repos/caskdata/cdap/issues/1219/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1219/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/1219/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/cdap/statuses/6f5cf498d3ea217c098e6072bf36c0280815ce68"}}}}