{"action":"created","comment":{"url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/comments/230659439","pull_request_review_id":171440047,"id":230659439,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDY1OTQzOQ==","diff_hunk":"@@ -0,0 +1,165 @@\n+/*\n+ * Copyright (C) 2006-2018 Talend Inc. - www.talend.com\n+ * \n+ * This source code is available under agreement available at\n+ * %InstallDIR%\\features\\org.talend.rcp.branding.%PRODUCTNAME%\\%PRODUCTNAME%license.txt\n+ * \n+ * You should have received a copy of the agreement along with this program; if not, write to Talend SA 9 rue Pages\n+ * 92150 Suresnes, France\n+ */\n+\n+package com.amalto.core.storage.services;\n+\n+import java.util.ArrayList;\n+import java.util.Collection;\n+import java.util.List;\n+import java.util.Map;\n+\n+import javax.ws.rs.DefaultValue;\n+import javax.ws.rs.GET;\n+import javax.ws.rs.Path;\n+import javax.ws.rs.QueryParam;\n+import javax.ws.rs.core.MediaType;\n+import javax.ws.rs.core.Response;\n+import javax.xml.stream.XMLStreamException;\n+\n+import org.apache.commons.lang.StringUtils;\n+import org.apache.log4j.Logger;\n+\n+import com.amalto.core.objects.ObjectPOJO;\n+import com.amalto.core.objects.datamodel.DataModelPOJOPK;\n+import com.amalto.core.objects.view.ViewPOJO;\n+import com.amalto.core.objects.view.ViewPOJOPK;\n+import com.amalto.core.save.MultiRecordsSaveException;\n+import com.amalto.core.server.MetadataRepositoryAdmin;\n+import com.amalto.core.server.ServerContext;\n+import com.amalto.core.server.api.View;\n+import com.amalto.core.storage.exception.ConstraintViolationException;\n+import com.amalto.core.util.LocaleUtil;\n+import com.amalto.core.util.Util;\n+import com.amalto.core.util.ValidateException;\n+\n+import io.swagger.annotations.Api;\n+import io.swagger.annotations.ApiOperation;\n+import io.swagger.annotations.ApiParam;\n+\n+import org.codehaus.jettison.json.JSONObject;\n+import org.talend.mdm.commmon.metadata.MetadataRepository;\n+import org.talend.mdm.commmon.util.webapp.XObjectType;\n+import org.talend.mdm.commmon.util.webapp.XSystemObjects;\n+import org.codehaus.jettison.json.JSONArray;\n+\n+@SuppressWarnings(\"nls\")\n+@Path(\"/system/views\")\n+@Api(value=\"Views management\", tags=\"Administration\")\n+public class SystemViews {\n+\n+    private static final Logger LOGGER = Logger.getLogger(SystemViews.class);\n+\n+    private static final String NODE_NAME = \"name\";\n+\n+    private static final String NODE_DESCRIPTION = \"description\";\n+\n+    private static final String NODE_DATA_MODEL_ID = \"dataModelId\";\n+\n+    private static final String DEFAULT_VIEW_PREFIX = \"Browse_items\";\n+\n+    public SystemViews() {\n+    }\n+\n+    @GET\n+    @ApiOperation(\"Get all views, not including the ones without data model deployed.\")\n+    public Response getViewList(@ApiParam(\"Optional parameter of language to get localized result, default: EN\")","path":"org.talend.mdm.core/src/com/amalto/core/storage/services/SystemViews.java","position":72,"original_position":72,"commit_id":"612798b587c1d4929018f75d4041d7130b2c7beb","original_commit_id":"612798b587c1d4929018f75d4041d7130b2c7beb","user":{"login":"pbabin","id":7779060,"node_id":"MDQ6VXNlcjc3NzkwNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/7779060?v=4","gravatar_id":"","url":"https://api.github.com/users/pbabin","html_url":"https://github.com/pbabin","followers_url":"https://api.github.com/users/pbabin/followers","following_url":"https://api.github.com/users/pbabin/following{/other_user}","gists_url":"https://api.github.com/users/pbabin/gists{/gist_id}","starred_url":"https://api.github.com/users/pbabin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbabin/subscriptions","organizations_url":"https://api.github.com/users/pbabin/orgs","repos_url":"https://api.github.com/users/pbabin/repos","events_url":"https://api.github.com/users/pbabin/events{/privacy}","received_events_url":"https://api.github.com/users/pbabin/received_events","type":"User","site_admin":false},"body":"parameter value should be lowercase, ie 'en'. If parameter isn't specified, I would rather say it returns all the raw values.\r\nAlso why not considering using header instead? Such `Accept-Language: fr`","created_at":"2018-11-05T08:09:42Z","updated_at":"2018-11-05T08:13:56Z","html_url":"https://github.com/Talend/tmdm-server-se/pull/694#discussion_r230659439","pull_request_url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/comments/230659439"},"html":{"href":"https://github.com/Talend/tmdm-server-se/pull/694#discussion_r230659439"},"pull_request":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694"}}},"pull_request":{"url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694","id":227199775,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MTk5Nzc1","html_url":"https://github.com/Talend/tmdm-server-se/pull/694","diff_url":"https://github.com/Talend/tmdm-server-se/pull/694.diff","patch_url":"https://github.com/Talend/tmdm-server-se/pull/694.patch","issue_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues/694","number":694,"state":"open","locked":false,"title":"TMDM-12669 REST API : Get the list of views","user":{"login":"VictorLi-talendbj","id":41668097,"node_id":"MDQ6VXNlcjQxNjY4MDk3","avatar_url":"https://avatars3.githubusercontent.com/u/41668097?v=4","gravatar_id":"","url":"https://api.github.com/users/VictorLi-talendbj","html_url":"https://github.com/VictorLi-talendbj","followers_url":"https://api.github.com/users/VictorLi-talendbj/followers","following_url":"https://api.github.com/users/VictorLi-talendbj/following{/other_user}","gists_url":"https://api.github.com/users/VictorLi-talendbj/gists{/gist_id}","starred_url":"https://api.github.com/users/VictorLi-talendbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VictorLi-talendbj/subscriptions","organizations_url":"https://api.github.com/users/VictorLi-talendbj/orgs","repos_url":"https://api.github.com/users/VictorLi-talendbj/repos","events_url":"https://api.github.com/users/VictorLi-talendbj/events{/privacy}","received_events_url":"https://api.github.com/users/VictorLi-talendbj/received_events","type":"User","site_admin":false},"body":"**What is the current behavior?** (You should also link to an open issue here)\r\n\r\nThis is a new feature.\r\nhttps://jira.talendforge.org/browse/TMDM-12669\r\n\r\n**What is the new behavior?**\r\n\r\nFrom MDM Rest Api, new added system/views under Administration, which will get all user views.\r\n\r\n**Please check if the PR fulfills these requirements**\r\n\r\n- [X] The commit message follows Talend standard\r\n- [X] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features) ?\r\n\r\n**What kind of change does this PR introduce?**\r\n\r\n- [ ] Bugfix\r\n- [X] Feature\r\n- [ ] Code style update (formatting, local variables)\r\n- [ ] Refactoring (no functional changes, no api changes)\r\n- [ ] Build / CI related changes\r\n- [ ] Other... Please describe:\r\n\r\n**Does this PR introduce a breaking change?**\r\n\r\n- [ ] Yes\r\n- [X] No\r\n\r\nIf this PR contains a breaking change, please describe the impact and migration path for existing applications: ...\r\n\r\n\r\n**Other information**:\r\n","created_at":"2018-10-31T08:39:57Z","updated_at":"2018-11-05T08:13:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aecde71f45d5b998d34ee51431a67b3c6f7ae96e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"zfkang-talend","id":17695060,"node_id":"MDQ6VXNlcjE3Njk1MDYw","avatar_url":"https://avatars1.githubusercontent.com/u/17695060?v=4","gravatar_id":"","url":"https://api.github.com/users/zfkang-talend","html_url":"https://github.com/zfkang-talend","followers_url":"https://api.github.com/users/zfkang-talend/followers","following_url":"https://api.github.com/users/zfkang-talend/following{/other_user}","gists_url":"https://api.github.com/users/zfkang-talend/gists{/gist_id}","starred_url":"https://api.github.com/users/zfkang-talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfkang-talend/subscriptions","organizations_url":"https://api.github.com/users/zfkang-talend/orgs","repos_url":"https://api.github.com/users/zfkang-talend/repos","events_url":"https://api.github.com/users/zfkang-talend/events{/privacy}","received_events_url":"https://api.github.com/users/zfkang-talend/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694/commits","review_comments_url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694/comments","review_comment_url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues/694/comments","statuses_url":"https://api.github.com/repos/Talend/tmdm-server-se/statuses/612798b587c1d4929018f75d4041d7130b2c7beb","head":{"label":"Talend:feature/7.2/TMDM-12669","ref":"feature/7.2/TMDM-12669","sha":"612798b587c1d4929018f75d4041d7130b2c7beb","user":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":21094730,"node_id":"MDEwOlJlcG9zaXRvcnkyMTA5NDczMA==","name":"tmdm-server-se","full_name":"Talend/tmdm-server-se","private":false,"owner":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Talend/tmdm-server-se","description":null,"fork":false,"url":"https://api.github.com/repos/Talend/tmdm-server-se","forks_url":"https://api.github.com/repos/Talend/tmdm-server-se/forks","keys_url":"https://api.github.com/repos/Talend/tmdm-server-se/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/tmdm-server-se/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/tmdm-server-se/teams","hooks_url":"https://api.github.com/repos/Talend/tmdm-server-se/hooks","issue_events_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/tmdm-server-se/events","assignees_url":"https://api.github.com/repos/Talend/tmdm-server-se/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/tmdm-server-se/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/tmdm-server-se/tags","blobs_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/tmdm-server-se/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/tmdm-server-se/languages","stargazers_url":"https://api.github.com/repos/Talend/tmdm-server-se/stargazers","contributors_url":"https://api.github.com/repos/Talend/tmdm-server-se/contributors","subscribers_url":"https://api.github.com/repos/Talend/tmdm-server-se/subscribers","subscription_url":"https://api.github.com/repos/Talend/tmdm-server-se/subscription","commits_url":"https://api.github.com/repos/Talend/tmdm-server-se/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/tmdm-server-se/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/tmdm-server-se/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/tmdm-server-se/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/tmdm-server-se/merges","archive_url":"https://api.github.com/repos/Talend/tmdm-server-se/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/tmdm-server-se/downloads","issues_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/tmdm-server-se/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/tmdm-server-se/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/tmdm-server-se/labels{/name}","releases_url":"https://api.github.com/repos/Talend/tmdm-server-se/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/tmdm-server-se/deployments","created_at":"2014-06-22T13:45:55Z","updated_at":"2018-11-05T02:23:24Z","pushed_at":"2018-11-05T07:54:30Z","git_url":"git://github.com/Talend/tmdm-server-se.git","ssh_url":"git@github.com:Talend/tmdm-server-se.git","clone_url":"https://github.com/Talend/tmdm-server-se.git","svn_url":"https://github.com/Talend/tmdm-server-se","homepage":null,"size":209575,"stargazers_count":16,"watchers_count":16,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":9,"open_issues":8,"watchers":16,"default_branch":"master"}},"base":{"label":"Talend:master","ref":"master","sha":"1fd5a6d022cbf69060d3f2c6785f15f1bc8dbb21","user":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"repo":{"id":21094730,"node_id":"MDEwOlJlcG9zaXRvcnkyMTA5NDczMA==","name":"tmdm-server-se","full_name":"Talend/tmdm-server-se","private":false,"owner":{"login":"Talend","id":459687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1OTY4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/459687?v=4","gravatar_id":"","url":"https://api.github.com/users/Talend","html_url":"https://github.com/Talend","followers_url":"https://api.github.com/users/Talend/followers","following_url":"https://api.github.com/users/Talend/following{/other_user}","gists_url":"https://api.github.com/users/Talend/gists{/gist_id}","starred_url":"https://api.github.com/users/Talend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Talend/subscriptions","organizations_url":"https://api.github.com/users/Talend/orgs","repos_url":"https://api.github.com/users/Talend/repos","events_url":"https://api.github.com/users/Talend/events{/privacy}","received_events_url":"https://api.github.com/users/Talend/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Talend/tmdm-server-se","description":null,"fork":false,"url":"https://api.github.com/repos/Talend/tmdm-server-se","forks_url":"https://api.github.com/repos/Talend/tmdm-server-se/forks","keys_url":"https://api.github.com/repos/Talend/tmdm-server-se/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Talend/tmdm-server-se/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Talend/tmdm-server-se/teams","hooks_url":"https://api.github.com/repos/Talend/tmdm-server-se/hooks","issue_events_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues/events{/number}","events_url":"https://api.github.com/repos/Talend/tmdm-server-se/events","assignees_url":"https://api.github.com/repos/Talend/tmdm-server-se/assignees{/user}","branches_url":"https://api.github.com/repos/Talend/tmdm-server-se/branches{/branch}","tags_url":"https://api.github.com/repos/Talend/tmdm-server-se/tags","blobs_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/refs{/sha}","trees_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Talend/tmdm-server-se/statuses/{sha}","languages_url":"https://api.github.com/repos/Talend/tmdm-server-se/languages","stargazers_url":"https://api.github.com/repos/Talend/tmdm-server-se/stargazers","contributors_url":"https://api.github.com/repos/Talend/tmdm-server-se/contributors","subscribers_url":"https://api.github.com/repos/Talend/tmdm-server-se/subscribers","subscription_url":"https://api.github.com/repos/Talend/tmdm-server-se/subscription","commits_url":"https://api.github.com/repos/Talend/tmdm-server-se/commits{/sha}","git_commits_url":"https://api.github.com/repos/Talend/tmdm-server-se/git/commits{/sha}","comments_url":"https://api.github.com/repos/Talend/tmdm-server-se/comments{/number}","issue_comment_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues/comments{/number}","contents_url":"https://api.github.com/repos/Talend/tmdm-server-se/contents/{+path}","compare_url":"https://api.github.com/repos/Talend/tmdm-server-se/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Talend/tmdm-server-se/merges","archive_url":"https://api.github.com/repos/Talend/tmdm-server-se/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Talend/tmdm-server-se/downloads","issues_url":"https://api.github.com/repos/Talend/tmdm-server-se/issues{/number}","pulls_url":"https://api.github.com/repos/Talend/tmdm-server-se/pulls{/number}","milestones_url":"https://api.github.com/repos/Talend/tmdm-server-se/milestones{/number}","notifications_url":"https://api.github.com/repos/Talend/tmdm-server-se/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Talend/tmdm-server-se/labels{/name}","releases_url":"https://api.github.com/repos/Talend/tmdm-server-se/releases{/id}","deployments_url":"https://api.github.com/repos/Talend/tmdm-server-se/deployments","created_at":"2014-06-22T13:45:55Z","updated_at":"2018-11-05T02:23:24Z","pushed_at":"2018-11-05T07:54:30Z","git_url":"git://github.com/Talend/tmdm-server-se.git","ssh_url":"git@github.com:Talend/tmdm-server-se.git","clone_url":"https://github.com/Talend/tmdm-server-se.git","svn_url":"https://github.com/Talend/tmdm-server-se","homepage":null,"size":209575,"stargazers_count":16,"watchers_count":16,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":9,"open_issues":8,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694"},"html":{"href":"https://github.com/Talend/tmdm-server-se/pull/694"},"issue":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/issues/694"},"comments":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/issues/694/comments"},"review_comments":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694/comments"},"review_comment":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/pulls/694/commits"},"statuses":{"href":"https://api.github.com/repos/Talend/tmdm-server-se/statuses/612798b587c1d4929018f75d4041d7130b2c7beb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pbabin"}}