{"action":"created","comment":{"url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/comments/33028814","id":33028814,"diff_hunk":"@@ -0,0 +1,60 @@\n+package com.clouway.subnets.http;\n+\n+import com.clouway.subnets.core.Category;\n+import com.google.inject.Inject;\n+import com.google.sitebricks.At;\n+import com.google.sitebricks.headless.Reply;\n+import com.google.sitebricks.headless.Request;\n+import com.google.sitebricks.headless.Service;\n+import com.google.sitebricks.http.Delete;\n+import com.google.sitebricks.http.Get;\n+import com.google.sitebricks.http.Post;\n+\n+import java.util.List;\n+\n+import static javax.servlet.http.HttpServletResponse.SC_OK;\n+\n+/**\n+ * @author Marian Zlatev <mzlatev91@gmail.com>\n+ */\n+@At(\"/r/category\")\n+@Service\n+class CategoryService {\n+\n+  private final CategoryRegistry registry;\n+\n+  @Inject\n+  public CategoryService(CategoryRegistry registry) {\n+    this.registry = registry;\n+  }\n+\n+  @Get\n+  public Reply<?> getAll() {\n+    List<Category> categories = registry.findAll();\n+\n+    return Reply.with(categories).status(SC_OK).as(Json.class);","path":"subnets/src/main/java/com/clouway/subnets/http/CategoryService.java","position":36,"original_position":35,"commit_id":"15fc8d5acfc7c73b60821baed8ab600e2ad51e01","original_commit_id":"1115393ba676ee9aba2c9fdc077dc83983fa259c","user":{"login":"NewestUser","id":7418570,"avatar_url":"https://avatars.githubusercontent.com/u/7418570?v=3","gravatar_id":"","url":"https://api.github.com/users/NewestUser","html_url":"https://github.com/NewestUser","followers_url":"https://api.github.com/users/NewestUser/followers","following_url":"https://api.github.com/users/NewestUser/following{/other_user}","gists_url":"https://api.github.com/users/NewestUser/gists{/gist_id}","starred_url":"https://api.github.com/users/NewestUser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewestUser/subscriptions","organizations_url":"https://api.github.com/users/NewestUser/orgs","repos_url":"https://api.github.com/users/NewestUser/repos","events_url":"https://api.github.com/users/NewestUser/events{/privacy}","received_events_url":"https://api.github.com/users/NewestUser/received_events","type":"User","site_admin":false},"body":"done","created_at":"2015-06-23T10:42:58Z","updated_at":"2015-06-23T10:42:58Z","html_url":"https://github.com/clouway-incubator/subnet-management-system/pull/11#discussion_r33028814","pull_request_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/comments/33028814"},"html":{"href":"https://github.com/clouway-incubator/subnet-management-system/pull/11#discussion_r33028814"},"pull_request":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11","id":38001097,"html_url":"https://github.com/clouway-incubator/subnet-management-system/pull/11","diff_url":"https://github.com/clouway-incubator/subnet-management-system/pull/11.diff","patch_url":"https://github.com/clouway-incubator/subnet-management-system/pull/11.patch","issue_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/issues/11","number":11,"state":"open","locked":false,"title":"subnet-management-system: register categories and display in tree view","user":{"login":"NewestUser","id":7418570,"avatar_url":"https://avatars.githubusercontent.com/u/7418570?v=3","gravatar_id":"","url":"https://api.github.com/users/NewestUser","html_url":"https://github.com/NewestUser","followers_url":"https://api.github.com/users/NewestUser/followers","following_url":"https://api.github.com/users/NewestUser/following{/other_user}","gists_url":"https://api.github.com/users/NewestUser/gists{/gist_id}","starred_url":"https://api.github.com/users/NewestUser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewestUser/subscriptions","organizations_url":"https://api.github.com/users/NewestUser/orgs","repos_url":"https://api.github.com/users/NewestUser/repos","events_url":"https://api.github.com/users/NewestUser/events{/privacy}","received_events_url":"https://api.github.com/users/NewestUser/received_events","type":"User","site_admin":false},"body":"#8 #9 \r\n![category_page](https://cloud.githubusercontent.com/assets/7418570/8231063/6f95c56a-15ce-11e5-9a43-41c79a125481.png)\r\nOn this page user can register and delete categories.\r\n\r\n![tree_page](https://cloud.githubusercontent.com/assets/7418570/8231127/e4e71c2e-15ce-11e5-8af5-c328e9caa1c3.png)\r\nOn this page currently only the existing categories can be viewed.\r\n","created_at":"2015-06-18T12:30:32Z","updated_at":"2015-06-23T10:42:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d98f3f14d2c57e8f72c4a8318fbf6d9c85689fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11/commits","review_comments_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11/comments","review_comment_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/issues/11/comments","statuses_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/statuses/15fc8d5acfc7c73b60821baed8ab600e2ad51e01","head":{"label":"NewestUser:m_zlatev","ref":"m_zlatev","sha":"15fc8d5acfc7c73b60821baed8ab600e2ad51e01","user":{"login":"NewestUser","id":7418570,"avatar_url":"https://avatars.githubusercontent.com/u/7418570?v=3","gravatar_id":"","url":"https://api.github.com/users/NewestUser","html_url":"https://github.com/NewestUser","followers_url":"https://api.github.com/users/NewestUser/followers","following_url":"https://api.github.com/users/NewestUser/following{/other_user}","gists_url":"https://api.github.com/users/NewestUser/gists{/gist_id}","starred_url":"https://api.github.com/users/NewestUser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewestUser/subscriptions","organizations_url":"https://api.github.com/users/NewestUser/orgs","repos_url":"https://api.github.com/users/NewestUser/repos","events_url":"https://api.github.com/users/NewestUser/events{/privacy}","received_events_url":"https://api.github.com/users/NewestUser/received_events","type":"User","site_admin":false},"repo":{"id":37460964,"name":"subnet-management-system","full_name":"NewestUser/subnet-management-system","owner":{"login":"NewestUser","id":7418570,"avatar_url":"https://avatars.githubusercontent.com/u/7418570?v=3","gravatar_id":"","url":"https://api.github.com/users/NewestUser","html_url":"https://github.com/NewestUser","followers_url":"https://api.github.com/users/NewestUser/followers","following_url":"https://api.github.com/users/NewestUser/following{/other_user}","gists_url":"https://api.github.com/users/NewestUser/gists{/gist_id}","starred_url":"https://api.github.com/users/NewestUser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewestUser/subscriptions","organizations_url":"https://api.github.com/users/NewestUser/orgs","repos_url":"https://api.github.com/users/NewestUser/repos","events_url":"https://api.github.com/users/NewestUser/events{/privacy}","received_events_url":"https://api.github.com/users/NewestUser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NewestUser/subnet-management-system","description":"Manage subnets","fork":true,"url":"https://api.github.com/repos/NewestUser/subnet-management-system","forks_url":"https://api.github.com/repos/NewestUser/subnet-management-system/forks","keys_url":"https://api.github.com/repos/NewestUser/subnet-management-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NewestUser/subnet-management-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NewestUser/subnet-management-system/teams","hooks_url":"https://api.github.com/repos/NewestUser/subnet-management-system/hooks","issue_events_url":"https://api.github.com/repos/NewestUser/subnet-management-system/issues/events{/number}","events_url":"https://api.github.com/repos/NewestUser/subnet-management-system/events","assignees_url":"https://api.github.com/repos/NewestUser/subnet-management-system/assignees{/user}","branches_url":"https://api.github.com/repos/NewestUser/subnet-management-system/branches{/branch}","tags_url":"https://api.github.com/repos/NewestUser/subnet-management-system/tags","blobs_url":"https://api.github.com/repos/NewestUser/subnet-management-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NewestUser/subnet-management-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NewestUser/subnet-management-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/NewestUser/subnet-management-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NewestUser/subnet-management-system/statuses/{sha}","languages_url":"https://api.github.com/repos/NewestUser/subnet-management-system/languages","stargazers_url":"https://api.github.com/repos/NewestUser/subnet-management-system/stargazers","contributors_url":"https://api.github.com/repos/NewestUser/subnet-management-system/contributors","subscribers_url":"https://api.github.com/repos/NewestUser/subnet-management-system/subscribers","subscription_url":"https://api.github.com/repos/NewestUser/subnet-management-system/subscription","commits_url":"https://api.github.com/repos/NewestUser/subnet-management-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/NewestUser/subnet-management-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/NewestUser/subnet-management-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/NewestUser/subnet-management-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/NewestUser/subnet-management-system/contents/{+path}","compare_url":"https://api.github.com/repos/NewestUser/subnet-management-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NewestUser/subnet-management-system/merges","archive_url":"https://api.github.com/repos/NewestUser/subnet-management-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NewestUser/subnet-management-system/downloads","issues_url":"https://api.github.com/repos/NewestUser/subnet-management-system/issues{/number}","pulls_url":"https://api.github.com/repos/NewestUser/subnet-management-system/pulls{/number}","milestones_url":"https://api.github.com/repos/NewestUser/subnet-management-system/milestones{/number}","notifications_url":"https://api.github.com/repos/NewestUser/subnet-management-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NewestUser/subnet-management-system/labels{/name}","releases_url":"https://api.github.com/repos/NewestUser/subnet-management-system/releases{/id}","created_at":"2015-06-15T11:26:15Z","updated_at":"2015-06-15T11:26:15Z","pushed_at":"2015-06-19T14:59:42Z","git_url":"git://github.com/NewestUser/subnet-management-system.git","ssh_url":"git@github.com:NewestUser/subnet-management-system.git","clone_url":"https://github.com/NewestUser/subnet-management-system.git","svn_url":"https://github.com/NewestUser/subnet-management-system","homepage":null,"size":1414,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"clouway-incubator:master","ref":"master","sha":"9df6b065a6d42a66a98371952666073e1e5bf866","user":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":37449766,"name":"subnet-management-system","full_name":"clouway-incubator/subnet-management-system","owner":{"login":"clouway-incubator","id":10173098,"avatar_url":"https://avatars.githubusercontent.com/u/10173098?v=3","gravatar_id":"","url":"https://api.github.com/users/clouway-incubator","html_url":"https://github.com/clouway-incubator","followers_url":"https://api.github.com/users/clouway-incubator/followers","following_url":"https://api.github.com/users/clouway-incubator/following{/other_user}","gists_url":"https://api.github.com/users/clouway-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/clouway-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clouway-incubator/subscriptions","organizations_url":"https://api.github.com/users/clouway-incubator/orgs","repos_url":"https://api.github.com/users/clouway-incubator/repos","events_url":"https://api.github.com/users/clouway-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/clouway-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clouway-incubator/subnet-management-system","description":"Manage subnets","fork":false,"url":"https://api.github.com/repos/clouway-incubator/subnet-management-system","forks_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/forks","keys_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/teams","hooks_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/hooks","issue_events_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/issues/events{/number}","events_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/events","assignees_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/assignees{/user}","branches_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/branches{/branch}","tags_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/tags","blobs_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/statuses/{sha}","languages_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/languages","stargazers_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/stargazers","contributors_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/contributors","subscribers_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/subscribers","subscription_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/subscription","commits_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/contents/{+path}","compare_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/merges","archive_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/downloads","issues_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/issues{/number}","pulls_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls{/number}","milestones_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/milestones{/number}","notifications_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/labels{/name}","releases_url":"https://api.github.com/repos/clouway-incubator/subnet-management-system/releases{/id}","created_at":"2015-06-15T07:19:44Z","updated_at":"2015-06-15T10:25:17Z","pushed_at":"2015-06-20T12:18:28Z","git_url":"git://github.com/clouway-incubator/subnet-management-system.git","ssh_url":"git@github.com:clouway-incubator/subnet-management-system.git","clone_url":"https://github.com/clouway-incubator/subnet-management-system.git","svn_url":"https://github.com/clouway-incubator/subnet-management-system","homepage":null,"size":2657,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":10,"forks":2,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11"},"html":{"href":"https://github.com/clouway-incubator/subnet-management-system/pull/11"},"issue":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/issues/11"},"comments":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/clouway-incubator/subnet-management-system/statuses/15fc8d5acfc7c73b60821baed8ab600e2ad51e01"}}}}