{"action":"created","comment":{"url":"https://api.github.com/repos/entando/entando-core/pulls/comments/173129447","pull_request_review_id":102263295,"id":173129447,"diff_hunk":"@@ -0,0 +1,61 @@\n+/*\r\n+ * Copyright 2018-Present Entando Inc. (http://www.entando.com) All rights reserved.\r\n+ *\r\n+ * This library is free software; you can redistribute it and/or modify it under\r\n+ * the terms of the GNU Lesser General Public License as published by the Free\r\n+ * Software Foundation; either version 2.1 of the License, or (at your option)\r\n+ * any later version.\r\n+ *\r\n+ * This library is distributed in the hope that it will be useful, but WITHOUT\r\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r\n+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\r\n+ * details.\r\n+ */\r\n+package org.entando.entando.web.entity;\r\n+\r\n+import com.agiletec.aps.system.services.role.Permission;\r\n+import org.entando.entando.aps.system.services.entity.IEntityManagerService;\r\n+import org.entando.entando.aps.system.services.entity.model.EntityManagerDto;\r\n+import org.entando.entando.web.common.annotation.RestAccessControl;\r\n+import org.entando.entando.web.common.model.PagedMetadata;\r\n+import org.entando.entando.web.common.model.RestListRequest;\r\n+import org.entando.entando.web.common.model.RestResponse;\r\n+import org.springframework.beans.factory.annotation.Autowired;\r\n+import org.springframework.http.HttpStatus;\r\n+import org.springframework.http.MediaType;\r\n+import org.springframework.http.ResponseEntity;\r\n+import org.springframework.web.bind.annotation.PathVariable;\r\n+import org.springframework.web.bind.annotation.RequestMapping;\r\n+import org.springframework.web.bind.annotation.RequestMethod;\r\n+import org.springframework.web.bind.annotation.RestController;\r\n+\r\n+@RestController\r\n+@RequestMapping(value = \"/entityManagers\")\r\n+public class EntityManagerController {\r\n+\r\n+    @Autowired\r\n+    private IEntityManagerService entityManagerService;\r\n+\r\n+    protected IEntityManagerService getEntityManagerService() {\r\n+        return entityManagerService;\r\n+    }\r\n+\r\n+    public void setEntityManagerService(IEntityManagerService entityManagerService) {\r\n+        this.entityManagerService = entityManagerService;\r\n+    }\r\n+\r\n+    @RestAccessControl(permission = Permission.SUPERUSER)\r\n+    @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r\n+    public ResponseEntity<?> getEntityManagers(RestListRequest requestList) {\r\n+        PagedMetadata<String> result = this.getEntityManagerService().getEntityManagers(requestList);\r\n+        return new ResponseEntity<>(new RestResponse(result.getBody(), null, result), HttpStatus.OK);\r\n+    }\r\n+\r\n+    @RestAccessControl(permission = Permission.SUPERUSER)\r\n+    @RequestMapping(value = \"/{entityManagerCode}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r\n+    public ResponseEntity<?> getEntityManager(@PathVariable String entityManagerCode) {\r\n+        EntityManagerDto dto = this.getEntityManagerService().getEntityManager(entityManagerCode);\r","path":"engine/src/main/java/org/entando/entando/web/entity/EntityManagerController.java","position":57,"original_position":57,"commit_id":"1b35558cf287a22f1ef19f56594c47deccaca43c","original_commit_id":"1b35558cf287a22f1ef19f56594c47deccaca43c","user":{"login":"joewhite101","id":838710,"avatar_url":"https://avatars0.githubusercontent.com/u/838710?v=4","gravatar_id":"","url":"https://api.github.com/users/joewhite101","html_url":"https://github.com/joewhite101","followers_url":"https://api.github.com/users/joewhite101/followers","following_url":"https://api.github.com/users/joewhite101/following{/other_user}","gists_url":"https://api.github.com/users/joewhite101/gists{/gist_id}","starred_url":"https://api.github.com/users/joewhite101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joewhite101/subscriptions","organizations_url":"https://api.github.com/users/joewhite101/orgs","repos_url":"https://api.github.com/users/joewhite101/repos","events_url":"https://api.github.com/users/joewhite101/events{/privacy}","received_events_url":"https://api.github.com/users/joewhite101/received_events","type":"User","site_admin":false},"body":"We should put some debug logging in these controllers with the payload.","created_at":"2018-03-08T11:13:04Z","updated_at":"2018-03-08T11:13:16Z","html_url":"https://github.com/entando/entando-core/pull/332#discussion_r173129447","pull_request_url":"https://api.github.com/repos/entando/entando-core/pulls/332","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/entando/entando-core/pulls/comments/173129447"},"html":{"href":"https://github.com/entando/entando-core/pull/332#discussion_r173129447"},"pull_request":{"href":"https://api.github.com/repos/entando/entando-core/pulls/332"}}},"pull_request":{"url":"https://api.github.com/repos/entando/entando-core/pulls/332","id":173699315,"html_url":"https://github.com/entando/entando-core/pull/332","diff_url":"https://github.com/entando/entando-core/pull/332.diff","patch_url":"https://github.com/entando/entando-core/pull/332.patch","issue_url":"https://api.github.com/repos/entando/entando-core/issues/332","number":332,"state":"open","locked":false,"title":"En 866 entity managers endpoints","user":{"login":"eugeniosant","id":1196388,"avatar_url":"https://avatars0.githubusercontent.com/u/1196388?v=4","gravatar_id":"","url":"https://api.github.com/users/eugeniosant","html_url":"https://github.com/eugeniosant","followers_url":"https://api.github.com/users/eugeniosant/followers","following_url":"https://api.github.com/users/eugeniosant/following{/other_user}","gists_url":"https://api.github.com/users/eugeniosant/gists{/gist_id}","starred_url":"https://api.github.com/users/eugeniosant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugeniosant/subscriptions","organizations_url":"https://api.github.com/users/eugeniosant/orgs","repos_url":"https://api.github.com/users/eugeniosant/repos","events_url":"https://api.github.com/users/eugeniosant/events{/privacy}","received_events_url":"https://api.github.com/users/eugeniosant/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-08T10:31:33Z","updated_at":"2018-03-08T11:13:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e445a6fc53b5ba2d05018c2a267f698cef033076","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/entando/entando-core/pulls/332/commits","review_comments_url":"https://api.github.com/repos/entando/entando-core/pulls/332/comments","review_comment_url":"https://api.github.com/repos/entando/entando-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/entando/entando-core/issues/332/comments","statuses_url":"https://api.github.com/repos/entando/entando-core/statuses/1b35558cf287a22f1ef19f56594c47deccaca43c","head":{"label":"entando:EN-866_entityManagers_endpoints","ref":"EN-866_entityManagers_endpoints","sha":"1b35558cf287a22f1ef19f56594c47deccaca43c","user":{"login":"entando","id":673103,"avatar_url":"https://avatars2.githubusercontent.com/u/673103?v=4","gravatar_id":"","url":"https://api.github.com/users/entando","html_url":"https://github.com/entando","followers_url":"https://api.github.com/users/entando/followers","following_url":"https://api.github.com/users/entando/following{/other_user}","gists_url":"https://api.github.com/users/entando/gists{/gist_id}","starred_url":"https://api.github.com/users/entando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/entando/subscriptions","organizations_url":"https://api.github.com/users/entando/orgs","repos_url":"https://api.github.com/users/entando/repos","events_url":"https://api.github.com/users/entando/events{/privacy}","received_events_url":"https://api.github.com/users/entando/received_events","type":"Organization","site_admin":false},"repo":{"id":23227907,"name":"entando-core","full_name":"entando/entando-core","owner":{"login":"entando","id":673103,"avatar_url":"https://avatars2.githubusercontent.com/u/673103?v=4","gravatar_id":"","url":"https://api.github.com/users/entando","html_url":"https://github.com/entando","followers_url":"https://api.github.com/users/entando/followers","following_url":"https://api.github.com/users/entando/following{/other_user}","gists_url":"https://api.github.com/users/entando/gists{/gist_id}","starred_url":"https://api.github.com/users/entando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/entando/subscriptions","organizations_url":"https://api.github.com/users/entando/orgs","repos_url":"https://api.github.com/users/entando/repos","events_url":"https://api.github.com/users/entando/events{/privacy}","received_events_url":"https://api.github.com/users/entando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/entando/entando-core","description":"Entando Core. The leading repository of Entando Platform.","fork":false,"url":"https://api.github.com/repos/entando/entando-core","forks_url":"https://api.github.com/repos/entando/entando-core/forks","keys_url":"https://api.github.com/repos/entando/entando-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/entando/entando-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/entando/entando-core/teams","hooks_url":"https://api.github.com/repos/entando/entando-core/hooks","issue_events_url":"https://api.github.com/repos/entando/entando-core/issues/events{/number}","events_url":"https://api.github.com/repos/entando/entando-core/events","assignees_url":"https://api.github.com/repos/entando/entando-core/assignees{/user}","branches_url":"https://api.github.com/repos/entando/entando-core/branches{/branch}","tags_url":"https://api.github.com/repos/entando/entando-core/tags","blobs_url":"https://api.github.com/repos/entando/entando-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/entando/entando-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/entando/entando-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/entando/entando-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/entando/entando-core/statuses/{sha}","languages_url":"https://api.github.com/repos/entando/entando-core/languages","stargazers_url":"https://api.github.com/repos/entando/entando-core/stargazers","contributors_url":"https://api.github.com/repos/entando/entando-core/contributors","subscribers_url":"https://api.github.com/repos/entando/entando-core/subscribers","subscription_url":"https://api.github.com/repos/entando/entando-core/subscription","commits_url":"https://api.github.com/repos/entando/entando-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/entando/entando-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/entando/entando-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/entando/entando-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/entando/entando-core/contents/{+path}","compare_url":"https://api.github.com/repos/entando/entando-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/entando/entando-core/merges","archive_url":"https://api.github.com/repos/entando/entando-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/entando/entando-core/downloads","issues_url":"https://api.github.com/repos/entando/entando-core/issues{/number}","pulls_url":"https://api.github.com/repos/entando/entando-core/pulls{/number}","milestones_url":"https://api.github.com/repos/entando/entando-core/milestones{/number}","notifications_url":"https://api.github.com/repos/entando/entando-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/entando/entando-core/labels{/name}","releases_url":"https://api.github.com/repos/entando/entando-core/releases{/id}","deployments_url":"https://api.github.com/repos/entando/entando-core/deployments","created_at":"2014-08-22T14:23:11Z","updated_at":"2018-02-23T23:50:47Z","pushed_at":"2018-03-08T10:31:33Z","git_url":"git://github.com/entando/entando-core.git","ssh_url":"git@github.com:entando/entando-core.git","clone_url":"https://github.com/entando/entando-core.git","svn_url":"https://github.com/entando/entando-core","homepage":"","size":19081,"stargazers_count":40,"watchers_count":40,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":16,"license":null,"forks":27,"open_issues":16,"watchers":40,"default_branch":"master"}},"base":{"label":"entando:master","ref":"master","sha":"2d188e6f954babbe04268a23a1cf0446004f6ff2","user":{"login":"entando","id":673103,"avatar_url":"https://avatars2.githubusercontent.com/u/673103?v=4","gravatar_id":"","url":"https://api.github.com/users/entando","html_url":"https://github.com/entando","followers_url":"https://api.github.com/users/entando/followers","following_url":"https://api.github.com/users/entando/following{/other_user}","gists_url":"https://api.github.com/users/entando/gists{/gist_id}","starred_url":"https://api.github.com/users/entando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/entando/subscriptions","organizations_url":"https://api.github.com/users/entando/orgs","repos_url":"https://api.github.com/users/entando/repos","events_url":"https://api.github.com/users/entando/events{/privacy}","received_events_url":"https://api.github.com/users/entando/received_events","type":"Organization","site_admin":false},"repo":{"id":23227907,"name":"entando-core","full_name":"entando/entando-core","owner":{"login":"entando","id":673103,"avatar_url":"https://avatars2.githubusercontent.com/u/673103?v=4","gravatar_id":"","url":"https://api.github.com/users/entando","html_url":"https://github.com/entando","followers_url":"https://api.github.com/users/entando/followers","following_url":"https://api.github.com/users/entando/following{/other_user}","gists_url":"https://api.github.com/users/entando/gists{/gist_id}","starred_url":"https://api.github.com/users/entando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/entando/subscriptions","organizations_url":"https://api.github.com/users/entando/orgs","repos_url":"https://api.github.com/users/entando/repos","events_url":"https://api.github.com/users/entando/events{/privacy}","received_events_url":"https://api.github.com/users/entando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/entando/entando-core","description":"Entando Core. The leading repository of Entando Platform.","fork":false,"url":"https://api.github.com/repos/entando/entando-core","forks_url":"https://api.github.com/repos/entando/entando-core/forks","keys_url":"https://api.github.com/repos/entando/entando-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/entando/entando-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/entando/entando-core/teams","hooks_url":"https://api.github.com/repos/entando/entando-core/hooks","issue_events_url":"https://api.github.com/repos/entando/entando-core/issues/events{/number}","events_url":"https://api.github.com/repos/entando/entando-core/events","assignees_url":"https://api.github.com/repos/entando/entando-core/assignees{/user}","branches_url":"https://api.github.com/repos/entando/entando-core/branches{/branch}","tags_url":"https://api.github.com/repos/entando/entando-core/tags","blobs_url":"https://api.github.com/repos/entando/entando-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/entando/entando-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/entando/entando-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/entando/entando-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/entando/entando-core/statuses/{sha}","languages_url":"https://api.github.com/repos/entando/entando-core/languages","stargazers_url":"https://api.github.com/repos/entando/entando-core/stargazers","contributors_url":"https://api.github.com/repos/entando/entando-core/contributors","subscribers_url":"https://api.github.com/repos/entando/entando-core/subscribers","subscription_url":"https://api.github.com/repos/entando/entando-core/subscription","commits_url":"https://api.github.com/repos/entando/entando-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/entando/entando-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/entando/entando-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/entando/entando-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/entando/entando-core/contents/{+path}","compare_url":"https://api.github.com/repos/entando/entando-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/entando/entando-core/merges","archive_url":"https://api.github.com/repos/entando/entando-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/entando/entando-core/downloads","issues_url":"https://api.github.com/repos/entando/entando-core/issues{/number}","pulls_url":"https://api.github.com/repos/entando/entando-core/pulls{/number}","milestones_url":"https://api.github.com/repos/entando/entando-core/milestones{/number}","notifications_url":"https://api.github.com/repos/entando/entando-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/entando/entando-core/labels{/name}","releases_url":"https://api.github.com/repos/entando/entando-core/releases{/id}","deployments_url":"https://api.github.com/repos/entando/entando-core/deployments","created_at":"2014-08-22T14:23:11Z","updated_at":"2018-02-23T23:50:47Z","pushed_at":"2018-03-08T10:31:33Z","git_url":"git://github.com/entando/entando-core.git","ssh_url":"git@github.com:entando/entando-core.git","clone_url":"https://github.com/entando/entando-core.git","svn_url":"https://github.com/entando/entando-core","homepage":"","size":19081,"stargazers_count":40,"watchers_count":40,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":16,"license":null,"forks":27,"open_issues":16,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/entando/entando-core/pulls/332"},"html":{"href":"https://github.com/entando/entando-core/pull/332"},"issue":{"href":"https://api.github.com/repos/entando/entando-core/issues/332"},"comments":{"href":"https://api.github.com/repos/entando/entando-core/issues/332/comments"},"review_comments":{"href":"https://api.github.com/repos/entando/entando-core/pulls/332/comments"},"review_comment":{"href":"https://api.github.com/repos/entando/entando-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/entando/entando-core/pulls/332/commits"},"statuses":{"href":"https://api.github.com/repos/entando/entando-core/statuses/1b35558cf287a22f1ef19f56594c47deccaca43c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"joewhite101"}}