public class GatewayWrapper extends Object implements Client
Contains the gateway, the security context, and the current user.
| Constructor and Description | 
|---|
| GatewayWrapper()Constructor of the GatewayWrapper class. | 
| GatewayWrapper(Gateway gateway,
              SecurityContext ctx,
              Experimenter user)Constructor of the GatewayWrapper class. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | connect(LoginCredentials credentials)Connects the user to OMERO. | 
| void | disconnect()Disconnects the user | 
| SecurityContext | getCtx()Contains the permissions of the user in the group. | 
| Gateway | getGateway()Returns the Gateway. | 
| Experimenter | getUser()Returns the current user. | 
| Client | sudo(String username)Returns a Client associated with the given username. | 
| void | switchGroup(long groupId)Change the current group used by the current user; | 
| String | toString()Overridden to return the host name, the group ID, the username and the connection status. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAdminFacility, getBrowseFacility, getDMFacility, getMetadataFacility, getQueryService, getRoiFacility, getTablesFacilityconnect, connect, connect, getCurrentGroupId, getId, getImportStore, getSessionId, isConnectedfindByQuery, getDataset, getDatasets, getDatasets, getDatasets, getDatasets, getFolder, getFolders, getFolders, getImage, getImages, getImages, getImages, getImages, getImages, getImagesLike, getImagesWithKey, getImagesWithKeyValuePair, getMapAnnotation, getMapAnnotations, getMapAnnotations, getMapAnnotations, getPlate, getPlates, getPlates, getPlates, getProject, getProjects, getProjects, getProjects, getProjects, getScreen, getScreens, getScreens, getScreens, getTag, getTags, getTags, getWell, getWells, getWells, getWells, loadFoldersdelete, delete, delete, delete, delete, deleteFile, savegetGroup, getUserpublic GatewayWrapper()
public GatewayWrapper(Gateway gateway, SecurityContext ctx, Experimenter user)
Null arguments will be replaced with default empty objects.
gateway - The Gateway.ctx - The security context.user - The user.public Gateway getGateway()
getGateway in interface ConnectionHandlerpublic Experimenter getUser()
getUser in interface ConnectionHandlerpublic SecurityContext getCtx()
getCtx in interface AdminManagergetCtx in interface BrowsergetCtx in interface ConnectionHandlergetCtx in interface DataManagerSecurityContext of the user.public void connect(LoginCredentials credentials) throws ServiceException
connect in interface ConnectionHandlercredentials - User credentials.ServiceException - Cannot connect to OMERO.public void disconnect()
disconnect in interface ConnectionHandlerpublic void switchGroup(long groupId)
switchGroup in interface ConnectionHandlergroupId - The group ID.public Client sudo(String username) throws ServiceException, AccessException, ExecutionException
All actions realized with the returned Client will be considered as his.
The user calling this function needs to have administrator rights.
sudo in interface Clientsudo in interface ConnectionHandlerusername - The user name.ServiceException - Cannot connect to OMERO.AccessException - Cannot access data.ExecutionException - A Facility can't be retrieved or instantiated.NoSuchElementException - The requested user does not exist.Copyright © 2020–2023 GReD. All rights reserved.