{"action":"created","comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/106387782","pull_request_review_id":27305628,"id":106387782,"diff_hunk":"@@ -229,4 +230,73 @@ public void testGetThumbnailAfterReset() throws Exception {\n         }\n         svc.close();\n     }\n+\n+    /**\n+     * Test that thumbnails can be retrieved from multiple groups at once.\n+     * @throws Throwable unexpected\n+     */\n+    @Test\n+    public void testGetThumbnailsMultipleGroups() throws Throwable {\n+        final byte[] thumbnail;\n+        final long pixelsIdα, pixelsIdβ;\n+        ThumbnailStorePrx svc = null;\n+\n+        /* create a fake image file */\n+        final File file = File.createTempFile(getClass().getSimpleName(), \".fake\");\n+        file.deleteOnExit();\n+\n+        try {\n+            /* import the image as one user in one group and get its thumbnail */\n+            pixelsIdα = importFile(importer, file, \"fake\", false).get(0).getId().getValue();\n+            svc = factory.createThumbnailStore();\n+            svc.setPixelsId(pixelsIdα);\n+            thumbnail = svc.getThumbnailByLongestSide(null);\n+        } finally {\n+            if (svc != null) {\n+                {\n+                    svc.close();\n+                    svc = null;\n+                }\n+            }\n+        }\n+\n+        setUpNewUserWithImporter();\n+\n+        try {\n+            /* import the image as another user in another group and get its thumbnail */\n+            pixelsIdβ = importFile(importer, file, \"fake\", false).get(0).getId().getValue();\n+            svc = factory.createThumbnailStore();\n+            svc.setPixelsId(pixelsIdβ);\n+            Assert.assertEquals(svc.getThumbnailByLongestSide(null), thumbnail);\n+        } finally {\n+            if (svc != null) {\n+                {\n+                    svc.close();\n+                    svc = null;\n+                }\n+            }\n+        }\n+\n+        final Map<Long, byte[]> thumbnails;\n+\n+        try {\n+            /* use all-groups context to fetch both thumbnails at once */\n+            final List<Long> pixelsIdsαβ = ImmutableList.of(pixelsIdα, pixelsIdβ);\n+            final Map<String, String> allGroupsContext = ImmutableMap.of(\"omero.group\", \"-1\");\n+            svc = factory.createThumbnailStore();\n+            thumbnails = svc.getThumbnailByLongestSideSet(null, pixelsIdsαβ, allGroupsContext);","path":"components/tools/OmeroJava/test/integration/ThumbnailStoreTest.java","position":101,"original_position":101,"commit_id":"76d85bdc98ad6ababf3dd94876dde41801557830","original_commit_id":"76d85bdc98ad6ababf3dd94876dde41801557830","user":{"login":"mtbc","id":2630707,"avatar_url":"https://avatars1.githubusercontent.com/u/2630707?v=3","gravatar_id":"","url":"https://api.github.com/users/mtbc","html_url":"https://github.com/mtbc","followers_url":"https://api.github.com/users/mtbc/followers","following_url":"https://api.github.com/users/mtbc/following{/other_user}","gists_url":"https://api.github.com/users/mtbc/gists{/gist_id}","starred_url":"https://api.github.com/users/mtbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtbc/subscriptions","organizations_url":"https://api.github.com/users/mtbc/orgs","repos_url":"https://api.github.com/users/mtbc/repos","events_url":"https://api.github.com/users/mtbc/events{/privacy}","received_events_url":"https://api.github.com/users/mtbc/received_events","type":"User","site_admin":false},"body":"`OmeroInterceptor.neededRight` does look like it, thank you. Maybe I was looking in just `BasicACLVoter` before. Interesting to see in that function that a `RenderingDef` can be linked to a `RenderingDef`.","created_at":"2017-03-16T10:53:00Z","updated_at":"2017-03-16T10:53:01Z","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/5172#discussion_r106387782","pull_request_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172","_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/106387782"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/5172#discussion_r106387782"},"pull_request":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172"}}},"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172","id":110147158,"html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/5172","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/5172.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/5172.patch","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/5172","number":5172,"state":"closed","locked":false,"title":"do not attempt to create rendering settings in all-groups context","user":{"login":"mtbc","id":2630707,"avatar_url":"https://avatars1.githubusercontent.com/u/2630707?v=3","gravatar_id":"","url":"https://api.github.com/users/mtbc","html_url":"https://github.com/mtbc","followers_url":"https://api.github.com/users/mtbc/followers","following_url":"https://api.github.com/users/mtbc/following{/other_user}","gists_url":"https://api.github.com/users/mtbc/gists{/gist_id}","starred_url":"https://api.github.com/users/mtbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtbc/subscriptions","organizations_url":"https://api.github.com/users/mtbc/orgs","repos_url":"https://api.github.com/users/mtbc/repos","events_url":"https://api.github.com/users/mtbc/events{/privacy}","received_events_url":"https://api.github.com/users/mtbc/received_events","type":"User","site_admin":false},"body":"# What this PR does\r\n\r\nAllows the retrieval of thumbnails from multiple groups at once.\r\n\r\n--rebased-to #5173 partially\r\n\r\n# Testing this PR\r\n\r\nhttps://ci.openmicroscopy.org/job/OMERO-DEV-merge-integration-java/lastCompletedBuild/testngreports/integration/ThumbnailStoreTest/testGetThumbnailsMultipleGroups/ should pass.\r\n\r\n# Related reading\r\n\r\nhttps://trello.com/c/bJqd3SkJ/316-getthumbnailbylongestsideset-doesn-t-accept-ctx","created_at":"2017-03-10T15:14:39Z","updated_at":"2017-03-16T10:53:01Z","closed_at":"2017-03-16T08:26:41Z","merged_at":null,"merge_commit_sha":"a44d79963c93593a020804191bd8864925ed196b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172/commits","review_comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172/comments","review_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/5172/comments","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/76d85bdc98ad6ababf3dd94876dde41801557830","head":{"label":"mtbc:thumbnail-context","ref":"thumbnail-context","sha":"76d85bdc98ad6ababf3dd94876dde41801557830","user":{"login":"mtbc","id":2630707,"avatar_url":"https://avatars1.githubusercontent.com/u/2630707?v=3","gravatar_id":"","url":"https://api.github.com/users/mtbc","html_url":"https://github.com/mtbc","followers_url":"https://api.github.com/users/mtbc/followers","following_url":"https://api.github.com/users/mtbc/following{/other_user}","gists_url":"https://api.github.com/users/mtbc/gists{/gist_id}","starred_url":"https://api.github.com/users/mtbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtbc/subscriptions","organizations_url":"https://api.github.com/users/mtbc/orgs","repos_url":"https://api.github.com/users/mtbc/repos","events_url":"https://api.github.com/users/mtbc/events{/privacy}","received_events_url":"https://api.github.com/users/mtbc/received_events","type":"User","site_admin":false},"repo":{"id":6350479,"name":"openmicroscopy","full_name":"mtbc/openmicroscopy","owner":{"login":"mtbc","id":2630707,"avatar_url":"https://avatars1.githubusercontent.com/u/2630707?v=3","gravatar_id":"","url":"https://api.github.com/users/mtbc","html_url":"https://github.com/mtbc","followers_url":"https://api.github.com/users/mtbc/followers","following_url":"https://api.github.com/users/mtbc/following{/other_user}","gists_url":"https://api.github.com/users/mtbc/gists{/gist_id}","starred_url":"https://api.github.com/users/mtbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtbc/subscriptions","organizations_url":"https://api.github.com/users/mtbc/orgs","repos_url":"https://api.github.com/users/mtbc/repos","events_url":"https://api.github.com/users/mtbc/events{/privacy}","received_events_url":"https://api.github.com/users/mtbc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtbc/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":true,"url":"https://api.github.com/repos/mtbc/openmicroscopy","forks_url":"https://api.github.com/repos/mtbc/openmicroscopy/forks","keys_url":"https://api.github.com/repos/mtbc/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtbc/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtbc/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/mtbc/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/mtbc/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/mtbc/openmicroscopy/events","assignees_url":"https://api.github.com/repos/mtbc/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/mtbc/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/mtbc/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/mtbc/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtbc/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtbc/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtbc/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtbc/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/mtbc/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/mtbc/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/mtbc/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/mtbc/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/mtbc/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/mtbc/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtbc/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtbc/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtbc/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtbc/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/mtbc/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtbc/openmicroscopy/merges","archive_url":"https://api.github.com/repos/mtbc/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtbc/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/mtbc/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/mtbc/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/mtbc/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/mtbc/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtbc/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/mtbc/openmicroscopy/releases{/id}","deployments_url":"https://api.github.com/repos/mtbc/openmicroscopy/deployments","created_at":"2012-10-23T10:26:50Z","updated_at":"2014-11-11T21:10:21Z","pushed_at":"2017-03-16T09:21:33Z","git_url":"git://github.com/mtbc/openmicroscopy.git","ssh_url":"git@github.com:mtbc/openmicroscopy.git","clone_url":"https://github.com/mtbc/openmicroscopy.git","svn_url":"https://github.com/mtbc/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":2072077,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"openmicroscopy:develop","ref":"develop","sha":"5236e46fd8f59d388b40895039f430049d59b1f3","user":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars1.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"repo":{"id":2228226,"name":"openmicroscopy","full_name":"openmicroscopy/openmicroscopy","owner":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars1.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmicroscopy/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":false,"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy","forks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/forks","keys_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/events","assignees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/merges","archive_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/releases{/id}","deployments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/deployments","created_at":"2011-08-18T14:26:02Z","updated_at":"2017-03-08T18:13:29Z","pushed_at":"2017-03-16T10:46:48Z","git_url":"git://github.com/openmicroscopy/openmicroscopy.git","ssh_url":"git@github.com:openmicroscopy/openmicroscopy.git","clone_url":"https://github.com/openmicroscopy/openmicroscopy.git","svn_url":"https://github.com/openmicroscopy/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":1971280,"stargazers_count":94,"watchers_count":94,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":17,"forks":77,"open_issues":17,"watchers":94,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/5172"},"issue":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/5172"},"comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/5172/comments"},"review_comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172/comments"},"review_comment":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/5172/commits"},"statuses":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/76d85bdc98ad6ababf3dd94876dde41801557830"}}}}
{"actor":{"display_login":"mtbc"}}