[ome-devel] listing wells of another users plate with Java API?

Jäälinoja, Harri Tapio harri.jaalinoja at helsinki.fi
Wed Feb 8 14:45:12 GMT 2017


Hi Dominik,

thanks! That helped, now the wells appeared.

Best,
Harri
________________________________________
From: ome-devel <ome-devel-bounces at lists.openmicroscopy.org.uk> on behalf of Dominik Lindner (Staff) <d.lindner at dundee.ac.uk>
Sent: 08 February 2017 13:09:39
To: OME External Developer List
Subject: Re: [ome-devel] listing wells of another users plate with Java API?

Hi Harri,

my suspicion is, that the plate is not in the user's default group.

In your example the SecurityContext ctx is set to the user's default group:
SecurityContext ctx = new SecurityContext(user.getGroupId());

You'd have to use a SecurityContext for the group the plate belongs to,
then you should get the wells, e. g.:

SecurityContext groupCtx = new SecurityContext(plate.getGroupId());
Collection<WellData> wells = browse.getWells(groupCtx, plateId);

Regards,
Dominik


> On 7 Feb 2017, at 15:25, Jäälinoja, Harri Tapio <harri.jaalinoja at helsinki.fi> wrote:
>
> Hi,
>
> I uploaded the same dataset also as the jenkins user. But this part...
>
> println 3
> Collection<WellData> wells = browse.getWells(ctx, plateId);
> Iterator<WellData> j = wells.iterator();
> WellData well;
> while (j.hasNext()) {
>    well = j.next();
>    //Do something
>        println 'well'
> }
>
> ... still doesn't print any wells even though the user owns the plate. I remembered to change the hardcoded plate ID.
>
> Best,
> Harri


The University of Dundee is a registered Scottish Charity, No: SC015096
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel


More information about the ome-devel mailing list