Package omero :: Package gateway :: Class _BlitzGateway
[hide private]
[frames] | no frames]

Class _BlitzGateway

source code


ICE_CONFIG - Defines the path to the Ice configuration

Instance Methods [hide private]
 
__init__(self, username=None, passwd=None, client_obj=None, group=None, clone=False, try_super=False, host=None, port=None, extra_config=[], secure=False, useragent=None)
TODO: Constructor
source code
 
getProperty(self, k) source code
 
clone(self) source code
 
setIdentity(self, username, passwd, _internal=False)
TODO: description
source code
 
suConn(self, username, group=None, ttl=60000)
If current user isAdmin, return new connection owned by 'username'
source code
 
keepAlive(self)
Keeps service alive.
source code
 
seppuku(self, softclose=False)
Terminates connection.
source code
 
__del__(self) source code
 
_createProxies(self)
Creates proxies to the server services.
source code
 
setSecure(self, secure=True)
Switches between SSL and insecure (faster) connections to Blitz.
source code
 
isSecure(self)
Returns 'True' if the underlying omero.clients.BaseClient is connected using SSL
source code
 
_createSession(self, skipSUuid=False)
Creates a new session for the principal given in the constructor.
source code
 
_closeSession(self)
Close session.
source code
 
_resetOmeroClient(self)
Resets omero.client object.
source code
 
connect(self, sUuid=None)
Creates or retrieves connection for the given sessionUuid.
source code
 
getLastError(self)
Returns error if thrown by _BlitzGateway.connect connect.
source code
 
isConnected(self)
Returns last status of connection.
source code
 
getEventContext(self)
Returns omero_System_ice.EventContext.
source code
 
getUser(self)
Returns current omero_model_ExperimenterI.
source code
 
getGroupFromContext(self)
Returns current omero_model_ExperimenterGroupI.
source code
 
isAdmin(self)
Checks if a user has administration privileges.
source code
 
canBeAdmin(self)
Checks if a user is in system group, i.e.
source code
 
isOwner(self, gid=None)
Checks if a user has owner privileges.
source code
 
canWrite(self, obj)
Checks if a user has write privileges to the given object.
source code
 
getSession(self) source code
 
setGroupNameForSession(self, group) source code
 
setGroupForSession(self, groupid) source code
 
revertGroupForSession(self) source code
 
getAdminService(self)
Gets reference to the admin service from ProxyObjectWrapper.
source code
 
getQueryService(self)
Gets reference to the query service from ProxyObjectWrapper.
source code
 
getContainerService(self)
Gets reference to the container service from ProxyObjectWrapper.
source code
 
getPixelsService(self)
Gets reference to the pixels service from ProxyObjectWrapper.
source code
 
getMetadataService(self)
Gets reference to the metadata service from ProxyObjectWrapper.
source code
 
getRoiService(self)
Gets ROI service.
source code
 
getScriptService(self)
Gets script service.
source code
 
createRawFileStore(self)
Creates a new raw file store.
source code
 
getRepositoryInfoService(self)
Gets reference to the repository info service from ProxyObjectWrapper.
source code
 
getShareService(self)
Gets reference to the share service from ProxyObjectWrapper.
source code
 
getTimelineService(self)
Gets reference to the timeline service from ProxyObjectWrapper.
source code
 
getTypesService(self)
Gets reference to the types service from ProxyObjectWrapper.
source code
 
getConfigService(self)
Gets reference to the config service from ProxyObjectWrapper.
source code
 
createRenderingEngine(self)
Creates a new rendering engine.
source code
 
getRenderingSettingsService(self)
Gets reference to the rendering settings service from ProxyObjectWrapper.
source code
 
createRawPixelsStore(self)
Creates a new raw pixels store.
source code
omero.gateway.ProxyObjectWrapper
createThumbnailStore(self)
Gets a reference to the thumbnail store on this connection object or creates a new one if none exists.
source code
 
createSearchService(self)
Creates a new search service.
source code
 
getUpdateService(self)
Gets reference to the update service from ProxyObjectWrapper.
source code
 
getDeleteService(self)
Gets reference to the delete service from ProxyObjectWrapper.
source code
 
getSessionService(self)
Gets reference to the session service from ProxyObjectWrapper.
source code
 
createExporter(self)
New instance of non cached Exporter, wrapped in ProxyObjectWrapper.
source code
 
listProjects(self, only_owned=False)
List every Projects controlled by the security system.
source code
 
getGroup(self, gid)
Fetch an Group and all contained users.
source code
 
lookupGroup(self, name)
Look up an Group and all contained users by name.
source code
 
getDefaultGroup(self, eid)
Retrieve the default group for the given user id.
source code
 
getOtherGroups(self, eid)
Fetch all groups of which the given user is a member.
source code
 
getGroupsLeaderOf(self)
Look up Groups where current user is a leader of.
source code
 
getGroupsMemberOf(self)
Look up Groups where current user is a member of (except "user").
source code
 
lookupExperimenters(self)
Look up all experimenters all related groups.
source code
 
getExperimenter(self, eid)
Return an Experimenter for the given ID.
source code
 
lookupExperimenter(self, name)
Return an Experimenter for the given username.
source code
 
containedExperimenters(self, gid)
Fetch all users contained in this group.
source code
 
getColleagues(self)
Look up users who are a member of the current user active group.
source code
 
getStaffs(self)
Look up users who are a member of the group owned by the current user.
source code
 
getColleaguesAndStaffs(self)
Look up users who are a member of the current user active group and users who are a member of the group owned by the current user.
source code
 
lookupGroups(self)
Looks up all groups and all related experimenters.
source code
 
lookupOwnedGroups(self)
Looks up owned groups for the logged user.
source code
 
getUsedSpace(self)
Returns the total space in bytes for this file system including nested subdirectories.
source code
 
getFreeSpace(self)
Returns the free or available space on this file system including nested subdirectories.
source code
 
getUsage(self)
Returns list of users and how much space each of them use.
source code
 
bytesPerPixel(self, pixel_type) source code
 
getOwnShares(self)
Gets all owned shares for the current user.
source code
 
getMemberShares(self)
Gets all shares where current user is a member.
source code
 
getMemberCount(self, share_ids)
Returns a map from share id to the count of total members (including the owner).
source code
 
getCommentCount(self, share_ids)
Returns a map from share id to comment count.
source code
 
getContents(self, share_id)
Looks up all items belong to the share.
source code
 
getComments(self, share_id)
Looks up all comments which belong to the share.
source code
 
getAllMembers(self, share_id)
Get all {@link Experimenter users} who are a member of the share.
source code
 
getAllGuests(self, share_id)
Get the email addresses for all share guests.
source code
 
getAllUsers(self, share_id)
Get a single set containing the login names of the users as well email addresses for guests.
source code
 
timelineListImages(self, tfrom=None, tto=None, limit=10, only_owned=True)
List images based on the their creation times.
source code
 
getProject(self, oid)
Return Project for the given ID.
source code
 
findProject(self, name)
Return Project with the given name.
source code
 
getDataset(self, oid)
Return Dataset for the given ID.
source code
 
getImage(self, oid)
Return Image for the given ID.
source code
 
getShare(self, oid)
Gets share for the given share id.
source code
 
getScreen(self, oid) source code
 
getPlate(self, oid) source code
 
getSpecifiedImages(self, oids) source code
 
getSpecifiedDatasets(self, oids) source code
 
getSpecifiedProjects(self, oids) source code
 
getSpecifiedPlates(self, oids) source code
 
getFileAnnotation(self, oid) source code
 
getCommentAnnotation(self, oid) source code
 
getTagAnnotation(self, oid) source code
 
lookupTagAnnotation(self, name) source code
 
listImages(self, ns, params=None)
TODO: description
source code
 
getEnumerationEntries(self, klass) source code
 
getEnumeration(self, klass, string) source code
 
getEnumerationById(self, klass, eid) source code
 
getOriginalEnumerations(self) source code
 
getEnumerations(self) source code
 
getEnumerationsWithEntries(self) source code
 
deleteEnumeration(self, obj) source code
 
createEnumeration(self, obj) source code
 
resetEnumerations(self, klass) source code
 
updateEnumerations(self, new_entries) source code
 
deleteObject(self, obj) source code
 
deleteAnnotation(self, oid, child=None, anns=None) source code
 
deleteImage(self, oid, anns=None) source code
 
deleteImages(self, ids, anns=None) source code
 
deletePlate(self, oid, anns=None) source code
 
deleteDataset(self, obj, child=None, anns=None) source code
 
deleteProject(self, obj, child=None, anns=None) source code
 
deleteScreen(self, obj, child=None, anns=None) source code
 
searchImages(self, text=None, created=None) source code
 
searchDatasets(self, text=None, created=None) source code
 
searchProjects(self, text=None, created=None) source code
 
searchScreens(self, text=None, created=None) source code
 
searchPlates(self, text=None, created=None) source code
 
simpleSearch(self, text, types=None)
Fulltext search on Projects, Datasets and Images.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ICE_CONFIG = None
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, username=None, passwd=None, client_obj=None, group=None, clone=False, try_super=False, host=None, port=None, extra_config=[], secure=False, useragent=None)
(Constructor)

source code 

TODO: Constructor

Parameters:
  • username - User name. String
  • passwd - Password. String
  • client_obj - omero.client
  • group - admin group
  • clone - Boolean
  • try_super - Boolean
  • host - Omero server host. String
  • port - Omero server port. Integer
  • extra_config
  • secure - Initial underlying omero.client connection type (True=SSL/False=insecure)
Overrides: object.__init__

setIdentity(self, username, passwd, _internal=False)

source code 

TODO: description

Parameters:
  • username - User name. String
  • passwd - Password. String
  • _internal - Boolean

keepAlive(self)

source code 

Keeps service alive. Returns True if connected. If connection was lost, reconnecting.

Returns:
Boolean

seppuku(self, softclose=False)

source code 

Terminates connection. If softclose is False, the session is really terminate disregarding its connection refcount.

Parameters:
  • softclose - Boolean

setSecure(self, secure=True)

source code 

Switches between SSL and insecure (faster) connections to Blitz. The gateway must already be connected.

connect(self, sUuid=None)

source code 

Creates or retrieves connection for the given sessionUuid. Returns True if connected.

Parameters:
  • sUuid - omero_model_SessionI
Returns:
Boolean

getLastError(self)

source code 

Returns error if thrown by _BlitzGateway.connect connect.

Returns:
String

isConnected(self)

source code 

Returns last status of connection.

Returns:
Boolean

getEventContext(self)

source code 

Returns omero_System_ice.EventContext. It containes:

   shareId, sessionId, sessionUuid, userId, userName, 
   groupId, groupName, isAdmin, isReadOnly, 
   eventId, eventType, eventType,
   memberOfGroups, leaderOfGroups
Returns:
omero.sys.EventContext

getUser(self)

source code 

Returns current omero_model_ExperimenterI.

Returns:
omero.model.ExperimenterI

getGroupFromContext(self)

source code 

Returns current omero_model_ExperimenterGroupI.

Returns:
omero.model.ExperimenterGroupI

isAdmin(self)

source code 

Checks if a user has administration privileges.

Returns:
Boolean

canBeAdmin(self)

source code 

Checks if a user is in system group, i.e. can have administration privileges.

Returns:
Boolean

isOwner(self, gid=None)

source code 

Checks if a user has owner privileges.

Returns:
Boolean

canWrite(self, obj)

source code 

Checks if a user has write privileges to the given object.

Parameters:
  • obj - Given object
Returns:
Boolean

getAdminService(self)

source code 

Gets reference to the admin service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getQueryService(self)

source code 

Gets reference to the query service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getContainerService(self)

source code 

Gets reference to the container service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getPixelsService(self)

source code 

Gets reference to the pixels service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getMetadataService(self)

source code 

Gets reference to the metadata service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getRoiService(self)

source code 

Gets ROI service.

Returns:
omero.gateway.ProxyObjectWrapper

getScriptService(self)

source code 

Gets script service.

Returns:
omero.gateway.ProxyObjectWrapper

createRawFileStore(self)

source code 

Creates a new raw file store. This service is special in that it does not get cached inside BlitzGateway so every call to this function returns a new object, avoiding unexpected inherited states.

Returns:
omero.gateway.ProxyObjectWrapper

getRepositoryInfoService(self)

source code 

Gets reference to the repository info service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getShareService(self)

source code 

Gets reference to the share service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getTimelineService(self)

source code 

Gets reference to the timeline service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getTypesService(self)

source code 

Gets reference to the types service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getConfigService(self)

source code 

Gets reference to the config service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

createRenderingEngine(self)

source code 

Creates a new rendering engine. This service is special in that it does not get cached inside BlitzGateway so every call to this function returns a new object, avoiding unexpected inherited states.

Returns:
omero.gateway.ProxyObjectWrapper

getRenderingSettingsService(self)

source code 

Gets reference to the rendering settings service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

createRawPixelsStore(self)

source code 

Creates a new raw pixels store. This service is special in that it does not get cached inside BlitzGateway so every call to this function returns a new object, avoiding unexpected inherited states.

Returns:
omero.gateway.ProxyObjectWrapper

createThumbnailStore(self)

source code 

Gets a reference to the thumbnail store on this connection object or creates a new one if none exists.

Returns: omero.gateway.ProxyObjectWrapper
The proxy wrapper of the thumbnail store

createSearchService(self)

source code 

Creates a new search service. This service is special in that it does not get cached inside BlitzGateway so every call to this function returns a new object, avoiding unexpected inherited states.

Returns:
omero.gateway.ProxyObjectWrapper

getUpdateService(self)

source code 

Gets reference to the update service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getDeleteService(self)

source code 

Gets reference to the delete service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

getSessionService(self)

source code 

Gets reference to the session service from ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

createExporter(self)

source code 

New instance of non cached Exporter, wrapped in ProxyObjectWrapper.

Returns:
omero.gateway.ProxyObjectWrapper

listProjects(self, only_owned=False)

source code 

List every Projects controlled by the security system.

Parameters:
  • only_owned - Only owned by the logged user. Boolean.
Returns:
Generator yielding _ProjectWrapper

getOtherGroups(self, eid)

source code 

Fetch all groups of which the given user is a member. The returned groups will have all fields filled in and all collections unloaded.

lookupExperimenters(self)

source code 

Look up all experimenters all related groups. The experimenters are also loaded.

getExperimenter(self, eid)

source code 

Return an Experimenter for the given ID.

Parameters:
  • eid - User ID.
Returns:
_ExperimenterWrapper or None

lookupExperimenter(self, name)

source code 

Return an Experimenter for the given username.

Parameters:
  • name - Username. String
Returns:
_ExperimenterWrapper or None

containedExperimenters(self, gid)

source code 

Fetch all users contained in this group. The returned users will have all fields filled in and all collections unloaded.

lookupGroups(self)

source code 

Looks up all groups and all related experimenters. The experimenters' groups are also loaded.

getMemberCount(self, share_ids)

source code 

Returns a map from share id to the count of total members (including the owner). This is represented by ome.model.meta.ShareMember links.

timelineListImages(self, tfrom=None, tto=None, limit=10, only_owned=True)

source code 

List images based on the their creation times. If both tfrom and tto are None, grab the most recent batch.

Parameters:
  • tfrom - milliseconds since the epoch for start date
  • tto - milliseconds since the epoch for end date
  • tlimit - maximum number of results
  • only_owned - Only owned by the logged user. Boolean.
Returns:
Generator yielding _ImageWrapper

getProject(self, oid)

source code 

Return Project for the given ID.

Parameters:
  • oid - Project ID.
Returns:
_ProjectWrapper or None

findProject(self, name)

source code 

Return Project with the given name.

Parameters:
  • name - Project name.
Returns:
_ProjectWrapper or None

getDataset(self, oid)

source code 

Return Dataset for the given ID.

Parameters:
  • oid - Dataset ID.
Returns:
_DatasetWrapper or None

getImage(self, oid)

source code 

Return Image for the given ID.

Parameters:
  • oid - Image ID.
Returns:
_ImageWrapper or None

listImages(self, ns, params=None)

source code 

TODO: description

Returns:
Generator yielding _ImageWrapper

simpleSearch(self, text, types=None)

source code 

Fulltext search on Projects, Datasets and Images. TODO: search other object types? TODO: batch support.