Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #8955 (closed)

Opened 12 years ago

Closed 12 years ago

BUG: omero.sys.Parameters vs Ice.Current

Reported by: atarkowska Owned by: jamoore
Priority: critical Milestone: OMERO-4.4
Component: Services Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2012-06-19 (17)

Description (last modified by atarkowska)

The latest changes that allows passing context groupId via Ice.Current to overwrite eventContext.groupId change the usage of omero.sys.Parameters().filter.groupId.

Competitions:

| omero.sys.Parameters.filter.groupId |     Ice.Current    |    groupId                |
|======================================================================================|
|              null / >=0             |       null         | EventContext.groupId      |
|              null / >=0             |  omero.group >= 0  | Ice.Current               |
|              null                   |  omero.group = -1  | cross group call          |
|              >=0                    |  omero.group = -1  | Parameters.filter.groupId |

Example of overwriting:

p = omero.sys.Parameters()
p.map = {}
f = omero.sys.Filter()
f.limit = rint(100000)
f.groupId = rlong(group_id)
f.ownerId = rlong(experimenter_id)

sql = "select i from Image i join fetch i.details.owner join fetch i.details.group"
conn.getQueryService().findAllByQuery(sql, p, {'omero.group': "-1"})

As discussed, would be nice to invoke wrapper to make sure services' methods are forced to use default value if Ice.Current is not set , like omero.group = -1. That is especially important in ISearch and ITimiline, as those services are expected to make cross group calls by default and results could be easily narrow down by Parameters then.

Change History (6)

comment:1 Changed 12 years ago by atarkowska

  • Component changed from General to Services
  • Priority changed from minor to critical
  • Summary changed from BUG: omero.sys.Parameters vs _ctx to BUG: omero.sys.Parameters vs Ice.Current

comment:2 Changed 12 years ago by atarkowska

  • Description modified (diff)

comment:3 Changed 12 years ago by jburel

  • Sprint changed from 2012-06-05 (16) to 2012-06-19 (17)

Moved from sprint 2012-06-05 (16)

comment:4 Changed 12 years ago by jmoore

Ola, does everything work as intended for the moment or is OmeroWeb/OmeroPy? waiting on this wrapper? (i.e. is this a "Bug:" or a "RFE:"?)

comment:5 Changed 12 years ago by atarkowska

Wrapper implemented in #9115.

tm.getEventLogsByPeriod(rtime(start), rtime(end), p, ServiceOptsDict({'omero.group': -1}))

Problem only resolved in python gateway. No server side implementation yet.

comment:6 Changed 12 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

Thanks, Ola. Opened an RFE #9137 to do this more globally.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.68044 sec.)

We're Hiring!