root/trunk/components/blitz/resources/omero/API.ice
| Revision 3219, 43.5 kB (checked in by donald, 30 hours ago) |
|---|
| Line | |
|---|---|
| 1 | /* |
| 2 | * $Id$ |
| 3 | * |
| 4 | * Copyright 2007 Glencoe Software, Inc. All rights reserved. |
| 5 | * Use is subject to license terms supplied in LICENSE.txt |
| 6 | * |
| 7 | */ |
| 8 | |
| 9 | #ifndef OMERO_API_ICE |
| 10 | #define OMERO_API_ICE |
| 11 | |
| 12 | #include <omero/ModelF.ice> |
| 13 | #include <omero/Collections.ice> |
| 14 | #include <omero/Constants.ice> |
| 15 | #include <omero/ROMIO.ice> |
| 16 | #include <omero/RTypes.ice> |
| 17 | #include <omero/Scripts.ice> |
| 18 | #include <omero/System.ice> |
| 19 | #include <Glacier2/Session.ice> |
| 20 | #include <Ice/BuiltinSequences.ice> |
| 21 | |
| 22 | /* |
| 23 | * The omero::api module defines all the central verbs for working |
| 24 | * with OMERO.blitz. Arguments and return values consist of those |
| 25 | * types defined in the other ice files available here. With no |
| 26 | * further custom code, it is possible to interoperate with |
| 27 | * OMERO.blitz simply via the definitions here. Start with the |
| 28 | * ServiceFactory definition at the end of this file. |
| 29 | * |
| 30 | * Note: Using these types is significantly easier in combination with |
| 31 | * the JavaDocs of the OMERO.server, specifically the ome.api |
| 32 | * package. Where not further noted below, the follow mappings between |
| 33 | * ome.api argument types and omero::api argument types hold: |
| 34 | * |
| 35 | * +-----------------------+------------------------+ |
| 36 | * | ome.api | omero::api | |
| 37 | * +-----------------------+------------------------+ |
| 38 | * |java.lang.Class |string | |
| 39 | * +-----------------------+------------------------+ |
| 40 | * |java.util.Set |java.util.List/vector | |
| 41 | * +-----------------------+------------------------+ |
| 42 | * |IPojo options (Map) |omero::sys::ParamMap | |
| 43 | * +-----------------------+------------------------+ |
| 44 | * |If null needed |omero::RType subclass | |
| 45 | * +-----------------------+------------------------+ |
| 46 | * |... |... | |
| 47 | * +-----------------------+------------------------+ |
| 48 | */ |
| 49 | module omero { |
| 50 | |
| 51 | module api { |
| 52 | |
| 53 | /* |
| 54 | * Service marker similar to ome.api.ServiceInterface |
| 55 | */ |
| 56 | interface ServiceInterface |
| 57 | { |
| 58 | }; |
| 59 | |
| 60 | sequence<ServiceInterface*> ServiceList; |
| 61 | |
| 62 | /* |
| 63 | * Service marker for stateful services which permits the closing |
| 64 | * of a particular service before the destruction of the session. |
| 65 | */ |
| 66 | ["ami", "amd"] interface StatefulServiceInterface extends ServiceInterface |
| 67 | { |
| 68 | void close() throws ServerError; |
| 69 | idempotent omero::sys::EventContext getCurrentEventContext() throws ServerError; |
| 70 | }; |
| 71 | |
| 72 | // Stateless service |
| 73 | // =================================================================================== |
| 74 | |
| 75 | /* |
| 76 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IAdmin.html |
| 77 | */ |
| 78 | ["ami", "amd"] interface IAdmin extends ServiceInterface |
| 79 | { |
| 80 | |
| 81 | // Getters |
| 82 | idempotent omero::model::Experimenter getExperimenter(long id) throws ServerError; |
| 83 | idempotent omero::model::Experimenter lookupExperimenter(string name) throws ServerError; |
| 84 | idempotent ExperimenterList lookupExperimenters() throws ServerError; |
| 85 | idempotent omero::model::ExperimenterGroup getGroup(long id) throws ServerError; |
| 86 | idempotent omero::model::ExperimenterGroup lookupGroup(string name) throws ServerError ; |
| 87 | idempotent ExperimenterGroupList lookupGroups() throws ServerError; |
| 88 | idempotent ExperimenterList containedExperimenters(long groupId) throws ServerError; |
| 89 | idempotent ExperimenterGroupList containedGroups(long experimenterId) throws ServerError; |
| 90 | idempotent omero::model::ExperimenterGroup getDefaultGroup(long experimenterId) throws ServerError; |
| 91 | idempotent string lookupLdapAuthExperimenter(long id) throws ServerError; |
| 92 | idempotent RList lookupLdapAuthExperimenters() throws ServerError; |
| 93 | |
| 94 | // Mutators |
| 95 | |
| 96 | void updateSelf(omero::model::Experimenter experimenter) throws ServerError; |
| 97 | void updateExperimenter(omero::model::Experimenter experimenter) throws ServerError; |
| 98 | void updateExperimenterWithPassword(omero::model::Experimenter experimenter, |
| 99 | omero::RString password) throws ServerError; |
| 100 | void updateGroup(omero::model::ExperimenterGroup group) throws ServerError; |
| 101 | long createUser(omero::model::Experimenter experimenter, string group) throws ServerError; |
| 102 | long createSystemUser(omero::model::Experimenter experimenter) throws ServerError; |
| 103 | long createExperimenter(omero::model::Experimenter user, |
| 104 | omero::model::ExperimenterGroup defaultGroup, ExperimenterGroupList groups) throws ServerError; |
| 105 | long createExperimenterWithPassword(omero::model::Experimenter user, omero::RString password, |
| 106 | omero::model::ExperimenterGroup defaultGroup, ExperimenterGroupList groups) throws ServerError; |
| 107 | long createGroup(omero::model::ExperimenterGroup group) throws ServerError; |
| 108 | idempotent void addGroups(omero::model::Experimenter user, ExperimenterGroupList groups) throws ServerError; |
| 109 | idempotent void removeGroups(omero::model::Experimenter user, ExperimenterGroupList groups) throws ServerError; |
| 110 | idempotent void setDefaultGroup(omero::model::Experimenter user, omero::model::ExperimenterGroup group) throws ServerError; |
| 111 | idempotent void setGroupOwner(omero::model::ExperimenterGroup group, omero::model::Experimenter owner) throws ServerError; |
| 112 | idempotent void deleteExperimenter(omero::model::Experimenter user) throws ServerError; |
| 113 | idempotent void deleteGroup(omero::model::ExperimenterGroup group) throws ServerError; |
| 114 | idempotent void changeOwner(omero::model::IObject obj, string omeName) throws ServerError; |
| 115 | idempotent void changeGroup(omero::model::IObject obj, string omeName) throws ServerError; |
| 116 | idempotent void changePermissions(omero::model::IObject obj, omero::model::Permissions perms) throws ServerError; |
| 117 | /* Leaving this non-idempotent, because of the overhead, though technically it is. */ |
| 118 | Ice::BoolSeq unlock(IObjectList objects) throws ServerError; |
| 119 | |
| 120 | // UAuth |
| 121 | idempotent void changePassword(omero::RString newPassword) throws ServerError; |
| 122 | idempotent void changeUserPassword(string omeName, omero::RString newPassword) throws ServerError; |
| 123 | idempotent void synchronizeLoginCache() throws ServerError; |
| 124 | void changeExpiredCredentials(string name, string oldCred, string newCred) throws ServerError; |
| 125 | void reportForgottenPassword(string name, string email) throws ServerError; |
| 126 | |
| 127 | // Security Context |
| 128 | idempotent omero::sys::Roles getSecurityRoles() throws ServerError; |
| 129 | idempotent omero::sys::EventContext getEventContext() throws ServerError; |
| 130 | }; |
| 131 | |
| 132 | /* |
| 133 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IConfig.html |
| 134 | */ |
| 135 | |
| 136 | ["ami", "amd"] interface IConfig extends ServiceInterface |
| 137 | { |
| 138 | idempotent string getVersion() throws ServerError; |
| 139 | idempotent string getConfigValue(string key) throws ServerError; |
| 140 | idempotent void setConfigValue(string key, string value) throws ServerError; |
| 141 | idempotent omero::RTime getDatabaseTime() throws ServerError; |
| 142 | idempotent omero::RTime getServerTime() throws ServerError; |
| 143 | }; |
| 144 | |
| 145 | /* |
| 146 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IDelete.html |
| 147 | */ |
| 148 | ["ami", "amd"] interface IDelete extends omero::api::ServiceInterface |
| 149 | { |
| 150 | omero::api::IObjectList checkImageDelete(long id, bool force) throws ServerError; |
| 151 | omero::api::IObjectList previewImageDelete(long id, bool force) throws ServerError; |
| 152 | void deleteImage(long id, bool force) throws ApiUsageException, ValidationException, SecurityViolation, ServerError; |
| 153 | void deleteImages(LongList ids, bool force) throws ApiUsageException, ValidationException, SecurityViolation, ServerError; |
| 154 | void deleteImagesByDataset(long datasetId, bool force) throws ApiUsageException, ValidationException, SecurityViolation, ServerError; |
| 155 | }; |
| 156 | |
| 157 | /* |
| 158 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/ILdap.html |
| 159 | */ |
| 160 | ["ami", "amd"] interface ILdap extends ServiceInterface |
| 161 | { |
| 162 | idempotent ExperimenterList searchAll() throws ServerError; |
| 163 | idempotent StringSet searchDnInGroups(string attr, string value) throws ServerError; |
| 164 | idempotent ExperimenterList searchByAttribute(string dn, string attribute, string value) throws ServerError; |
| 165 | idempotent ExperimenterList searchByAttributes(string dn, StringSet attributes, StringSet values) throws ServerError; |
| 166 | idempotent omero::model::Experimenter searchByDN(string userdn) throws ServerError; |
| 167 | idempotent string findDN(string username) throws ServerError; |
| 168 | idempotent omero::model::Experimenter findExperimenter(string username) throws ServerError; |
| 169 | idempotent void setDN(omero::RLong experimenterID, string dn) throws ServerError; |
| 170 | idempotent ExperimenterGroupList searchGroups() throws ServerError; |
| 171 | idempotent StringSet getReqGroups() throws ServerError; |
| 172 | idempotent StringSet getReqAttributes() throws ServerError; |
| 173 | idempotent StringSet getReqValues() throws ServerError; |
| 174 | idempotent void setReqGroups(StringSet groups) throws ServerError; |
| 175 | idempotent void setReqAttributes(StringSet attrs) throws ServerError; |
| 176 | idempotent void setReqValues(StringSet vals) throws ServerError; |
| 177 | idempotent bool getSetting() throws ServerError; |
| 178 | }; |
| 179 | |
| 180 | |
| 181 | /* |
| 182 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IPixels.html |
| 183 | */ |
| 184 | ["ami", "amd"] interface IPixels extends ServiceInterface |
| 185 | { |
| 186 | idempotent omero::model::Pixels retrievePixDescription(long pixId) throws ServerError; |
| 187 | idempotent omero::model::RenderingDef retrieveRndSettings(long pixId) throws ServerError; |
| 188 | idempotent omero::model::RenderingDef loadRndSettings(long renderingSettingsId) throws ServerError; |
| 189 | void saveRndSettings(omero::model::RenderingDef rndSettings) throws ServerError; |
| 190 | idempotent int getBitDepth(omero::model::PixelsType type) throws ServerError; |
| 191 | idempotent omero::RObject getEnumeration(string enumClass, string value) throws ServerError; |
| 192 | idempotent IObjectList getAllEnumerations(string enumClass) throws ServerError; |
| 193 | omero::RLong copyAndResizePixels(long pixelsId, |
| 194 | omero::RInt sizeX, |
| 195 | omero::RInt sizeY, |
| 196 | omero::RInt sizeZ, |
| 197 | omero::RInt sizeT, |
| 198 | omero::sys::IntList channelList, |
| 199 | string methodology, |
| 200 | bool copyStats) throws ServerError; |
| 201 | omero::RLong copyAndResizeImage(long imageId, |
| 202 | omero::RInt sizeX, |
| 203 | omero::RInt sizeY, |
| 204 | omero::RInt sizeZ, |
| 205 | omero::RInt sizeT, |
| 206 | omero::sys::IntList channelList, |
| 207 | string methodology, |
| 208 | bool copyStats) throws ServerError; |
| 209 | omero::RLong createImage(int sizeX, int sizeY, int sizeZ, int sizeT, |
| 210 | omero::sys::IntList channelList, |
| 211 | omero::model::PixelsType pixelsType, |
| 212 | string name, string description) throws ServerError; |
| 213 | void setChannelGlobalMinMax(long pixelsId, int channelIndex, double min, double max) throws ServerError; |
| 214 | }; |
| 215 | |
| 216 | /* |
| 217 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IPojos.html |
| 218 | */ |
| 219 | ["ami", "amd"] interface IPojos extends ServiceInterface |
| 220 | { |
| 221 | idempotent IObjectList loadContainerHierarchy(string rootType, omero::sys::LongList rootIds, omero::sys::ParamMap options) throws ServerError; |
| 222 | idempotent IObjectList findContainerHierarchies(string rootType, omero::sys::LongList imageIds, omero::sys::ParamMap options) throws ServerError; |
| 223 | idempotent AnnotationMap findAnnotations(string rootType, omero::sys::LongList rootIds, omero::sys::LongList annotatorIds, omero::sys::ParamMap options) throws ServerError; |
| 224 | idempotent IObjectList findCGCPaths(omero::sys::LongList imageIds, string algo, omero::sys::ParamMap options) throws ServerError; |
| 225 | idempotent ImageList getImages(string rootType, omero::sys::LongList rootIds, omero::sys::ParamMap options) throws ServerError; |
| 226 | idempotent ImageList getUserImages(omero::sys::ParamMap options) throws ServerError; |
| 227 | idempotent ImageList getImagesByOptions(omero::sys::ParamMap options) throws ServerError; |
| 228 | idempotent UserMap getUserDetails(StringSet names, omero::sys::ParamMap options) throws ServerError; |
| 229 | idempotent omero::sys::CountMap getCollectionCount(string type, string property, omero::sys::LongList ids, omero::sys::ParamMap options) throws ServerError; |
| 230 | idempotent IObjectList retrieveCollection(omero::model::IObject obj, string collectionName, omero::sys::ParamMap options) throws ServerError; |
| 231 | omero::model::IObject createDataObject(omero::model::IObject obj, omero::sys::ParamMap options) throws ServerError; |
| 232 | IObjectList createDataObjects(IObjectList dataObjects, omero::sys::ParamMap options) throws ServerError; |
| 233 | void unlink(IObjectList links, omero::sys::ParamMap options) throws ServerError; |
| 234 | IObjectList link(IObjectList links, omero::sys::ParamMap options) throws ServerError; |
| 235 | omero::model::IObject updateDataObject(omero::model::IObject obj, omero::sys::ParamMap options) throws ServerError; |
| 236 | IObjectList updateDataObjects(IObjectList objs, omero::sys::ParamMap options) throws ServerError; |
| 237 | void deleteDataObject(omero::model::IObject obj, omero::sys::ParamMap options) throws ServerError; |
| 238 | void deleteDataObjects(IObjectList objs, omero::sys::ParamMap options) throws ServerError; |
| 239 | }; |
| 240 | |
| 241 | /* |
| 242 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IProjection.html |
| 243 | */ |
| 244 | ["ami", "amd"] interface IProjection extends ServiceInterface |
| 245 | { |
| 246 | Ice::ByteSeq projectStack(long pixelsId, |
| 247 | omero::model::PixelsType pixelsType, |
| 248 | omero::constants::projection::ProjectionType algorithm, |
| 249 | int timepoint, int channelIndex, int stepping, |
| 250 | int start, int end) throws ServerError; |
| 251 | long projectPixels(long pixelsId, omero::model::PixelsType pixelsType, |
| 252 | omero::constants::projection::ProjectionType algorithm, |
| 253 | int tStart, int tEnd, |
| 254 | omero::sys::IntList channelList, int stepping, |
| 255 | int zStart, int zEnd, string name) |
| 256 | throws ServerError; |
| 257 | }; |
| 258 | |
| 259 | |
| 260 | /* |
| 261 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IQuery.html |
| 262 | */ |
| 263 | ["ami", "amd"] interface IQuery extends ServiceInterface |
| 264 | { |
| 265 | idempotent omero::model::IObject get(string klass, long id) throws ServerError; |
| 266 | idempotent omero::model::IObject find(string klass, long id) throws ServerError; |
| 267 | idempotent IObjectList findAll(string klass, omero::sys::Filter filter) throws ServerError; |
| 268 | idempotent omero::model::IObject findByExample(omero::model::IObject example) throws ServerError; |
| 269 | idempotent IObjectList findAllByExample(omero::model::IObject example, omero::sys::Filter filter) throws ServerError; |
| 270 | idempotent omero::model::IObject findByString(string klass, string field, string value) throws ServerError; |
| 271 | idempotent IObjectList findAllByString(string klass, string field, string value, bool caseSensitive, omero::sys::Filter filter) throws ServerError; |
| 272 | idempotent omero::model::IObject findByQuery(string query, omero::sys::Parameters params) throws ServerError; |
| 273 | idempotent IObjectList findAllByQuery(string query, omero::sys::Parameters params) throws ServerError; |
| 274 | idempotent IObjectList findAllByFullText(string klass, string query, omero::sys::Parameters params) throws ServerError; |
| 275 | idempotent omero::model::IObject refresh(omero::model::IObject iObject) throws ServerError; |
| 276 | }; |
| 277 | |
| 278 | /* |
| 279 | * Forward declaration; see omero/api/IScript.ice |
| 280 | * |
| 281 | * If you receive a segfault or a bus error in Python, be sure to |
| 282 | * also import the definition "import omero_api_IScript_ice". For |
| 283 | * more information see: |
| 284 | * |
| 285 | * http://www.zeroc.com/forums/bug-reports/3883-bus-error-under-mac-ox-10-4-icepy-3-3-0-a.html#post17120 |
| 286 | */ |
| 287 | interface IScript; // |
| 288 | |
| 289 | /* |
| 290 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/ISession.html |
| 291 | */ |
| 292 | ["ami", "amd"] interface ISession extends ServiceInterface |
| 293 | { |
| 294 | omero::model::Session createSession(omero::sys::Principal p, string credentials) throws ServerError; |
| 295 | omero::model::Session getSession(string sessionUuid) throws ServerError; |
| 296 | omero::model::Session updateSession(omero::model::Session sess) throws ServerError; |
| 297 | void closeSession(omero::model::Session sess) throws ServerError; |
| 298 | // System users |
| 299 | omero::model::Session createSessionWithTimeout(omero::sys::Principal p, long milliSeconds) throws ServerError; |
| 300 | |
| 301 | // Environment |
| 302 | omero::RType getInput(string sess, string key) throws ServerError; |
| 303 | omero::RType getOutput(string sess, string key) throws ServerError; |
| 304 | void setInput(string sess, string key, omero::RType value) throws ServerError; |
| 305 | void setOutput(string sess, string key, omero::RType value) throws ServerError; |
| 306 | StringSet getInputKeys(string sess) throws ServerError; |
| 307 | StringSet getOutputKeys(string sess) throws ServerError; |
| 308 | }; |
| 309 | |
| 310 | /* |
| 311 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IShare.html |
| 312 | */ |
| 313 | ["ami", "amd"] interface IShare extends ServiceInterface |
| 314 | { |
| 315 | void activate(long shareId) throws ServerError; |
| 316 | omero::model::Share getShare(long shareId) throws ServerError; |
| 317 | SessionList getAllShares(bool active) throws ServerError; |
| 318 | SessionList getOwnShares(bool active) throws ServerError; |
| 319 | SessionList getMemberShares(bool active) throws ServerError; |
| 320 | SessionList getSharesOwnedBy(omero::model::Experimenter user, bool active) throws ServerError; |
| 321 | SessionList getMemberSharesFor(omero::model::Experimenter user, bool active) throws ServerError; |
| 322 | IObjectList getContents(long shareId) throws ServerError; |
| 323 | IObjectList getContentSubList(long shareId, int start, int finish) throws ServerError; |
| 324 | int getContentSize(long shareId) throws ServerError; |
| 325 | IdListMap getContentMap(long shareId) throws ServerError; |
| 326 | |
| 327 | long createShare(string description, |
| 328 | omero::RTime expiration, |
| 329 | IObjectList items, |
| 330 | ExperimenterList exps, |
| 331 | StringSet guests, |
| 332 | bool enabled) throws ServerError; |
| 333 | void setDescription(long shareId, string description) throws ServerError; |
| 334 | void setExpiration(long shareId, omero::RTime expiration) throws ServerError; |
| 335 | void setActive(long shareId, bool active) throws ServerError; |
| 336 | void closeShare(long shareId) throws ServerError; |
| 337 | |
| 338 | void addObjects(long shareId, IObjectList iobjects) throws ServerError; |
| 339 | void addObject(long shareId, omero::model::IObject iobject) throws ServerError; |
| 340 | void removeObjects(long shareId, IObjectList iobjects) throws ServerError; |
| 341 | void removeObject(long shareId, omero::model::IObject iobject) throws ServerError; |
| 342 | |
| 343 | AnnotationList getComments(long shareId) throws ServerError; |
| 344 | omero::model::TextAnnotation addComment(long shareId, string comment) throws ServerError; |
| 345 | omero::model::TextAnnotation addReply(long shareId, |
| 346 | string comment, |
| 347 | omero::model::TextAnnotation replyTo) throws ServerError; |
| 348 | void deleteComment(omero::model::Annotation comment) throws ServerError; |
| 349 | |
| 350 | ExperimenterList getAllMembers(long shareId) throws ServerError; |
| 351 | StringSet getAllGuests(long shareId) throws ServerError; |
| 352 | StringSet getAllUsers(long shareId) throws ValidationException, ServerError; |
| 353 | void addUsers(long shareId, ExperimenterList exps) throws ServerError; |
| 354 | void addGuests(long shareId, StringSet emailAddresses) throws ServerError; |
| 355 | void removeUsers(long shareId, ExperimenterList exps) throws ServerError; |
| 356 | void removeGuests(long shareId, StringSet emailAddresses) throws ServerError; |
| 357 | void addUser(long shareId, omero::model::Experimenter exp) throws ServerError; |
| 358 | void addGuest(long shareId, string emailAddress) throws ServerError; |
| 359 | void removeUser(long shareId, omero::model::Experimenter exp) throws ServerError; |
| 360 | void removeGuest(long shareId, string emailAddress) throws ServerError; |
| 361 | |
| 362 | // Under construction |
| 363 | UserMap getActiveConnections(long shareId) throws ServerError; |
| 364 | UserMap getPastConnections(long shareId) throws ServerError; |
| 365 | void invalidateConnection(long shareId, omero::model::Experimenter exp) throws ServerError; |
| 366 | IObjectList getEvents(long shareId, omero::model::Experimenter exp, omero::RTime from, omero::RTime to) throws ServerError; |
| 367 | }; |
| 368 | |
| 369 | /* |
| 370 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/ITypes.html |
| 371 | */ |
| 372 | ["ami", "amd"] interface ITypes extends ServiceInterface |
| 373 | { |
| 374 | omero::model::IObject createEnumeration(omero::model::IObject newEnum) throws ServerError; |
| 375 | idempotent omero::model::IObject getEnumeration(string type, string value) throws ServerError; |
| 376 | idempotent IObjectList allEnumerations(string type) throws ServerError; |
| 377 | omero::model::IObject updateEnumeration(omero::model::IObject oldEnum) throws ServerError; |
| 378 | void updateEnumerations(IObjectList oldEnums) throws ServerError; |
| 379 | void deleteEnumeration(omero::model::IObject oldEnum) throws ServerError; |
| 380 | idempotent StringSet getEnumerationTypes() throws ServerError; |
| 381 | idempotent StringSet getAnnotationTypes() throws ServerError; |
| 382 | idempotent IObjectListMap getEnumerationsWithEntries() throws ServerError; |
| 383 | IObjectList getOriginalEnumerations() throws ServerError; |
| 384 | void resetEnumerations(string enumClass) throws ServerError; |
| 385 | }; |
| 386 | |
| 387 | /* |
| 388 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IUpdate.html |
| 389 | */ |
| 390 | ["ami", "amd"] interface IUpdate extends ServiceInterface |
| 391 | { |
| 392 | void saveObject(omero::model::IObject obj) throws ServerError; |
| 393 | void saveCollection(IObjectList objs) throws ServerError; |
| 394 | omero::model::IObject saveAndReturnObject(omero::model::IObject obj) throws ServerError; |
| 395 | void saveArray(IObjectList graph) throws ServerError; |
| 396 | IObjectList saveAndReturnArray(IObjectList graph) throws ServerError; |
| 397 | void deleteObject(omero::model::IObject row) throws ServerError; |
| 398 | void indexObject(omero::model::IObject row) throws ServerError; |
| 399 | }; |
| 400 | |
| 401 | /* |
| 402 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IRenderingSettings.html |
| 403 | */ |
| 404 | ["ami", "amd"] interface IRenderingSettings extends ServiceInterface |
| 405 | { |
| 406 | bool sanityCheckPixels(omero::model::Pixels pFrom, omero::model::Pixels pTo) throws ServerError; |
| 407 | omero::model::RenderingDef getRenderingSettings(long pixelsId) throws ServerError; |
| 408 | omero::model::RenderingDef createNewRenderingDef(omero::model::Pixels pixels) throws ServerError; |
| 409 | void resetDefaults(omero::model::RenderingDef def, omero::model::Pixels pixels) throws ServerError; |
| 410 | omero::model::RenderingDef resetDefaultsNoSave(omero::model::RenderingDef def, omero::model::Pixels pixels) throws ServerError; |
| 411 | void resetDefaultsInImage(long imageId) throws ServerError; |
| 412 | omero::sys::LongList resetDefaultsInCategory(long categoryId) throws ServerError; |
| 413 | omero::sys::LongList resetDefaultsInDataset(long dataSetId) throws ServerError; |
| 414 | omero::sys::LongList resetDefaultsInSet(string type, omero::sys::LongList noteIds) throws ServerError; |
| 415 | void applySettingsToSet(long from, string toType, IObjectList to) throws ServerError; |
| 416 | BooleanIdListMap applySettingsToProject(long from, long to) throws ServerError; |
| 417 | BooleanIdListMap applySettingsToDataset(long from, long to) throws ServerError; |
| 418 | BooleanIdListMap applySettingsToCategory(long from, long to) throws ServerError; |
| 419 | bool applySettingsToImage(long from, long to) throws ServerError; |
| 420 | bool applySettingsToPixels(long from, long to) throws ServerError; |
| 421 | void setOriginalSettingsInImage(long imageId) throws ServerError; |
| 422 | omero::sys::LongList setOriginalSettingsInDataset(long dataSetId) throws ServerError; |
| 423 | omero::sys::LongList setOriginalSettingsInSet(string type, omero::sys::LongList noteIds) throws ServerError; |
| 424 | }; |
| 425 | |
| 426 | /* |
| 427 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/IRepositoryInfo.html |
| 428 | */ |
| 429 | ["ami", "amd"] interface IRepositoryInfo extends ServiceInterface |
| 430 | { |
| 431 | idempotent long getUsedSpaceInKilobytes() throws ServerError; |
| 432 | idempotent long getFreeSpaceInKilobytes() throws ServerError; |
| 433 | idempotent double getUsageFraction() throws ServerError; |
| 434 | void sanityCheckRepository() throws ServerError; |
| 435 | void removeUnusedFiles() throws ServerError; |
| 436 | }; |
| 437 | |
| 438 | |
| 439 | /* |
| 440 | * Service for the querying of OMERO metadata based on creation and modification |
| 441 | * time. Currently supported types for querying include: |
| 442 | * |
| 443 | * - "Annotation" |
| 444 | * - "Dataset" |
| 445 | * - "Image" |
| 446 | * - "Project" |
| 447 | * - "RenderingDef" |
| 448 | * |
| 449 | * Return maps: |
| 450 | * ----------- |
| 451 | * The map return values will be indexed by the short type name above: |
| 452 | * "Project", "Image", ... All keys which are passed in the StringSet |
| 453 | * argument will be included in the returned map, even if they have no |
| 454 | * values. A default value of 0 or the empty list [] will be used. |
| 455 | * The only exception to this rule is that the null or empty StringSet |
| 456 | * implies all valid keys. |
| 457 | * |
| 458 | * Parameters: |
| 459 | * ---------- |
| 460 | * All methods with take omero::sys::Parameters object will apply the filter |
| 461 | * object for paging through the data in order to prevent loading too |
| 462 | * many objects. If the parameters argument is null or no paging is activated, |
| 463 | * then the default will be: OFFSET=0, LIMIT=50 |
| 464 | * |
| 465 | * Merging: |
| 466 | * ------- |
| 467 | * The methods which take a StringSet and a Parameters object, also have |
| 468 | * a "bool merge" argument. This argument defines whether or not the LIMIT |
| 469 | * applies to each object independently (["a","b"] @ 100 == 200) or merges |
| 470 | * the lists together chronologically (["a","b"] @ 100 merged == 100). |
| 471 | * |
| 472 | * A typical invocation might look like (in Python): |
| 473 | * |
| 474 | * timeline = sf.getTimelineService() |
| 475 | * params = ParametersI().page(0,100) |
| 476 | * types = ["Project","Dataset"]) |
| 477 | * map = timeline.getByPeriod(types, params, False) |
| 478 | * |
| 479 | * At this point, map will not contain more than 200 objects. |
| 480 | * |
| 481 | * This service is defined only in Blitz and so no javadoc is available |
| 482 | * in the ome.api package. |
| 483 | * |
| 484 | * TODOS: binning, stateful caching, ... |
| 485 | */ |
| 486 | ["ami", "amd"] interface ITimeline extends ServiceInterface { |
| 487 | |
| 488 | /* |
| 489 | * Return the last LIMIT comment annotations attached to a share. |
| 490 | * |
| 491 | * Note: Currently the storage of these objects is not optimal |
| 492 | * and so this method may change. Most likely for something of |
| 493 | * the form: getMostRecentAnnotations(string namespace, int limit) |
| 494 | */ |
| 495 | AnnotationList |
| 496 | getMostRecentShareComments(omero::sys::Parameters p) |
| 497 | throws ServerError; |
| 498 | |
| 499 | /* |
| 500 | * Returns the last LIMIT objects of TYPES as ordered by |
| 501 | * creation/modification times in the Event table. |
| 502 | */ |
| 503 | IObjectListMap |
| 504 | getMostRecentObjects(StringSet types, omero::sys::Parameters p, bool merge) |
| 505 | throws ServerError; |
| 506 | |
| 507 | /* |
| 508 | * Returns the given LIMIT objects of TYPES as ordered by |
| 509 | * creation/modification times in the Event table, but |
| 510 | * within the given time window. |
| 511 | */ |
| 512 | IObjectListMap |
| 513 | getByPeriod(StringSet types, omero::RTime start, omero::RTime end, omero::sys::Parameters p, bool merge) |
| 514 | throws ServerError; |
| 515 | |
| 516 | /* |
| 517 | * Queries the same information as getByPeriod, but only returns the counts |
| 518 | * for the given objects. |
| 519 | */ |
| 520 | StringLongMap |
| 521 | countByPeriod(StringSet types, omero::RTime start, omero::RTime end) |
| 522 | throws ServerError; |
| 523 | |
| 524 | /* |
| 525 | * Returns the Event table objects which are queried to produce the counts above. |
| 526 | * Note the concept of "period inclusion" mentioned above. |
| 527 | */ |
| 528 | EventList |
| 529 | getEventsByPeriod(omero::RTime start, omero::RTime end, omero::sys::Parameters p) |
| 530 | throws ServerError; |
| 531 | |
| 532 | }; |
| 533 | |
| 534 | // Stateful services |
| 535 | // =================================================================================== |
| 536 | |
| 537 | interface Gateway; // Forward definition. See omero/Gateway.ice |
| 538 | |
| 539 | /* |
| 540 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/JobHandle.html |
| 541 | */ |
| 542 | ["ami", "amd"] interface JobHandle extends StatefulServiceInterface |
| 543 | { |
| 544 | long submit(omero::model::Job j) throws ServerError; |
| 545 | omero::model::JobStatus attach(long jobId) throws ServerError; |
| 546 | omero::model::Job getJob() throws ServerError; |
| 547 | omero::model::JobStatus jobStatus() throws ServerError; |
| 548 | omero::RTime jobFinished() throws ServerError; |
| 549 | string jobMessage() throws ServerError; |
| 550 | bool jobRunning() throws ServerError; |
| 551 | bool jobError() throws ServerError; |
| 552 | void cancelJob() throws ServerError; |
| 553 | }; |
| 554 | |
| 555 | /* |
| 556 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/RawFileStore.html |
| 557 | */ |
| 558 | ["ami", "amd"] interface RawFileStore extends StatefulServiceInterface |
| 559 | { |
| 560 | void setFileId(long fileId) throws ServerError; |
| 561 | idempotent Ice::ByteSeq read(long position, int length) throws ServerError; |
| 562 | idempotent void write(Ice::ByteSeq buf, long position, int length) throws ServerError; |
| 563 | idempotent bool exists() throws ServerError; |
| 564 | }; |
| 565 | |
| 566 | /* |
| 567 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/RawPixelsStore.html |
| 568 | */ |
| 569 | ["ami", "amd"] interface RawPixelsStore extends StatefulServiceInterface |
| 570 | { |
| 571 | void setPixelsId(long pixelsId) throws ServerError; |
| 572 | idempotent int getPlaneSize() throws ServerError; |
| 573 | idempotent int getRowSize() throws ServerError; |
| 574 | idempotent int getStackSize() throws ServerError; |
| 575 | idempotent int getTimepointSize() throws ServerError; |
| 576 | idempotent int getTotalSize() throws ServerError; |
| 577 | idempotent long getRowOffset(int y, int z, int c, int t) throws ServerError; |
| 578 | idempotent long getPlaneOffset(int z, int c, int t) throws ServerError; |
| 579 | idempotent long getStackOffset(int c, int t) throws ServerError; |
| 580 | idempotent long getTimepointOffset(int t) throws ServerError; |
| 581 | idempotent Ice::ByteSeq getRegion(int size, long offset) throws ServerError; |
| 582 | idempotent Ice::ByteSeq getRow(int y, int z, int c, int t) throws ServerError; |
| 583 | idempotent Ice::ByteSeq getCol(int x, int z, int c, int t) throws ServerError; |
| 584 | idempotent Ice::ByteSeq getPlane(int z, int c, int t) throws ServerError; |
| 585 | idempotent Ice::ByteSeq getPlaneRegion(int z, int c, int t, int size, int offset) throws ServerError; |
| 586 | idempotent Ice::ByteSeq getStack(int c, int t) throws ServerError; |
| 587 | idempotent Ice::ByteSeq getTimepoint(int t) throws ServerError; |
| 588 | idempotent void setRegion(int size, long offset, Ice::ByteSeq buffer) throws ServerError; |
| 589 | idempotent void setRow(Ice::ByteSeq buf, int y, int z, int c, int t) throws ServerError; |
| 590 | idempotent void setPlane(Ice::ByteSeq buf, int z, int c, int t) throws ServerError; |
| 591 | idempotent void setStack(Ice::ByteSeq buf, int z, int c, int t) throws ServerError; |
| 592 | idempotent void setTimepoint(Ice::ByteSeq buf, int t) throws ServerError; |
| 593 | idempotent int getByteWidth() throws ServerError; |
| 594 | idempotent bool isSigned() throws ServerError; |
| 595 | idempotent bool isFloat() throws ServerError; |
| 596 | idempotent Ice::ByteSeq calculateMessageDigest() throws ServerError; |
| 597 | }; |
| 598 | |
| 599 | /* |
| 600 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/omeis/re/providers/RenderingEngine.html |
| 601 | */ |
| 602 | ["ami", "amd"] interface RenderingEngine extends StatefulServiceInterface |
| 603 | { |
| 604 | omero::romio::RGBBuffer render(omero::romio::PlaneDef def) throws ServerError; |
| 605 | Ice::IntSeq renderAsPackedInt(omero::romio::PlaneDef def) throws ServerError; |
| 606 | Ice::IntSeq renderProjectedAsPackedInt(omero::constants::projection::ProjectionType algorithm, int timepoint, int stepping, int start, int end) throws ServerError; |
| 607 | Ice::ByteSeq renderCompressed(omero::romio::PlaneDef def) throws ServerError; |
| 608 | Ice::ByteSeq renderProjectedCompressed(omero::constants::projection::ProjectionType algorithm, int timepoint, int stepping, int start, int end) throws ServerError; |
| 609 | void lookupPixels(long pixelsId) throws ServerError; |
| 610 | bool lookupRenderingDef(long pixelsId) throws ServerError; |
| 611 | void loadRenderingDef(long renderingDefId) throws ServerError; |
| 612 | void load() throws ServerError; |
| 613 | void setModel(omero::model::RenderingModel model) throws ServerError; |
| 614 | omero::model::RenderingModel getModel() throws ServerError; |
| 615 | int getDefaultZ() throws ServerError; |
| 616 | int getDefaultT() throws ServerError; |
| 617 | void setDefaultZ(int z) throws ServerError; |
| 618 | void setDefaultT(int t) throws ServerError; |
| 619 | omero::model::Pixels getPixels() throws ServerError; |
| 620 | IObjectList getAvailableModels() throws ServerError; |
| 621 | IObjectList getAvailableFamilies() throws ServerError; |
| 622 | void setQuantumStrategy(int bitResolution) throws ServerError; |
| 623 | void setCodomainInterval(int start, int end) throws ServerError; |
| 624 | omero::model::QuantumDef getQuantumDef() throws ServerError; |
| 625 | void setQuantizationMap(int w, omero::model::Family fam, double coefficient, bool noiseReduction) throws ServerError; |
| 626 | omero::model::Family getChannelFamily(int w) throws ServerError; |
| 627 | bool getChannelNoiseReduction(int w) throws ServerError; |
| 628 | Ice::DoubleSeq getChannelStats(int w) throws ServerError; |
| 629 | double getChannelCurveCoefficient(int w) throws ServerError; |
| 630 | void setChannelWindow(int w, double start, double end) throws ServerError; |
| 631 | double getChannelWindowStart(int w) throws ServerError; |
| 632 | double getChannelWindowEnd(int w) throws ServerError; |
| 633 | void setRGBA(int w, int red, int green, int blue, int alpha) throws ServerError; |
| 634 | Ice::IntSeq getRGBA(int w) throws ServerError; |
| 635 | void setActive(int w, bool active) throws ServerError; |
| 636 | bool isActive(int w) throws ServerError; |
| 637 | void addCodomainMap(omero::romio::CodomainMapContext mapCtx) throws ServerError; |
| 638 | void updateCodomainMap(omero::romio::CodomainMapContext mapCtx) throws ServerError; |
| 639 | void removeCodomainMap(omero::romio::CodomainMapContext mapCtx) throws ServerError; |
| 640 | void saveCurrentSettings() throws ServerError; |
| 641 | void resetDefaults() throws ServerError; |
| 642 | void resetDefaultsNoSave() throws ServerError; |
| 643 | void setCompressionLevel(float percentage) throws ServerError; |
| 644 | float getCompressionLevel() throws ServerError; |
| 645 | bool isPixelsTypeSigned() throws ServerError; |
| 646 | double getPixelsTypeUpperBound(int w) throws ServerError; |
| 647 | double getPixelsTypeLowerBound(int w) throws ServerError; |
| 648 | }; |
| 649 | |
| 650 | /* |
| 651 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/Search.html |
| 652 | */ |
| 653 | ["ami", "amd"] interface Search extends StatefulServiceInterface |
| 654 | { |
| 655 | |
| 656 | // Non-query state ~~~~~~~~~~~~~~~~~~~~~~ |
| 657 | |
| 658 | int activeQueries() throws ServerError; |
| 659 | void setBatchSize(int size) throws ServerError; |
| 660 | int getBatchSize() throws ServerError; |
| 661 | void setMergedBatches(bool merge) throws ServerError; |
| 662 | bool isMergedBatches() throws ServerError; |
| 663 | void setCaseSentivice(bool caseSensitive) throws ServerError; |
| 664 | bool isCaseSensitive() throws ServerError; |
| 665 | void setUseProjections(bool useProjections) throws ServerError; |
| 666 | bool isUseProjections() throws ServerError; |
| 667 | void setReturnUnloaded(bool returnUnloaded) throws ServerError; |
| 668 | bool isReturnUnloaded() throws ServerError; |
| 669 | void setAllowLeadingWildcard(bool allowLeadingWildcard) throws ServerError; |
| 670 | bool isAllowLeadingWildcard() throws ServerError; |
| 671 | |
| 672 | |
| 673 | // Filters ~~~~~~~~~~~~~~~~~~~~~~ |
| 674 | |
| 675 | void onlyType(string klass) throws ServerError; |
| 676 | void onlyTypes(StringSet classes) throws ServerError; |
| 677 | void allTypes() throws ServerError; |
| 678 | void onlyIds(omero::sys::LongList ids) throws ServerError; |
| 679 | void onlyOwnedBy(omero::model::Details d) throws ServerError; |
| 680 | void notOwnedBy(omero::model::Details d) throws ServerError; |
| 681 | void onlyCreatedBetween(omero::RTime start, omero::RTime stop) throws ServerError; |
| 682 | void onlyModifiedBetween(omero::RTime start, omero::RTime stop) throws ServerError; |
| 683 | void onlyAnnotatedBetween(omero::RTime start, omero::RTime stop) throws ServerError; |
| 684 | void onlyAnnotatedBy(omero::model::Details d) throws ServerError; |
| 685 | void notAnnotatedBy(omero::model::Details d) throws ServerError; |
| 686 | void onlyAnnotatedWith(StringSet classes) throws ServerError; |
| 687 | |
| 688 | |
| 689 | // Fetches, order, counts, etc ~~~~~~~~~~~~~~~~~~~~~~ |
| 690 | |
| 691 | void addOrderByAsc(string path) throws ServerError; |
| 692 | void addOrderByDesc(string path) throws ServerError; |
| 693 | void unordered() throws ServerError; |
| 694 | void fetchAnnotations(StringSet classes) throws ServerError; |
| 695 | void fetchAlso(StringSet fetches) throws ServerError; |
| 696 | |
| 697 | |
| 698 | // Reset ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 699 | |
| 700 | void resetDefaults() throws ServerError; |
| 701 | |
| 702 | |
| 703 | // Query state ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 704 | |
| 705 | void byGroupForTags(string group) throws ServerError; |
| 706 | void byTagForGroups(string tag) throws ServerError; |
| 707 | void byFullText(string query) throws ServerError; |
| 708 | void byHqlQuery(string query, omero::sys::Parameters params) throws ServerError; |
| 709 | void bySomeMustNone(StringSet some, StringSet must, StringSet none) throws ServerError; |
| 710 | void byAnnotatedWith(AnnotationList examples) throws ServerError; |
| 711 | void clearQueries() throws ServerError; |
| 712 | |
| 713 | void and() throws ServerError; |
| 714 | void or() throws ServerError; |
| 715 | void not() throws ServerError; |
| 716 | |
| 717 | |
| 718 | // Retrieval ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 719 | |
| 720 | bool hasNext() throws ServerError; |
| 721 | omero::model::IObject next() throws ServerError; |
| 722 | IObjectList results() throws ServerError; |
| 723 | |
| 724 | // Currently unused |
| 725 | SearchMetadata currentMetadata() throws ServerError; |
| 726 | SearchMetadataList currentMetadataList() throws ServerError; |
| 727 | |
| 728 | // Unused; Part of Java Iterator interface |
| 729 | void remove() throws ServerError; |
| 730 | }; |
| 731 | |
| 732 | /* |
| 733 | * See http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/ome/api/ThumbnailStore.html |
| 734 | */ |
| 735 | ["ami", "amd"] interface ThumbnailStore extends StatefulServiceInterface |
| 736 | { |
| 737 | bool setPixelsId(long pixelsId) throws ServerError; |
| 738 | void setRenderingDefId(long renderingDefId) throws ServerError; |
| 739 | Ice::ByteSeq getThumbnail(omero::RInt sizeX, omero::RInt sizeY) throws ServerError; |
| 740 | omero::sys::IdByteMap getThumbnailSet(omero::RInt sizeX, omero::RInt sizeY, omero::sys::LongList pixelsIds) throws ServerError; |
| 741 | omero::sys::IdByteMap getThumbnailByLongestSideSet(omero::RInt size, omero::sys::LongList pixelsIds) throws ServerError; |
| 742 | Ice::ByteSeq getThumbnailByLongestSide(omero::RInt size) throws ServerError; |
| 743 | Ice::ByteSeq getThumbnailByLongestSideDirect(omero::RInt size) throws ServerError; |
| 744 | Ice::ByteSeq getThumbnailDirect(omero::RInt sizeX, omero::RInt sizeY) throws ServerError; |
| 745 | Ice::ByteSeq getThumbnailForSectionDirect(int theZ, int theT, omero::RInt sizeX, omero::RInt sizeY) throws ServerError; |
| 746 | Ice::ByteSeq getThumbnailForSectionByLongestSideDirect(int theZ, int theT, omero::RInt size) throws ServerError; |
| 747 | void createThumbnails() throws ServerError; |
| 748 | void createThumbnail(omero::RInt sizeX, omero::RInt sizeY) throws ServerError; |
| 749 | bool thumbnailExists(omero::RInt sizeX, omero::RInt sizeY) throws ServerError; |
| 750 | void resetDefaults() throws ServerError; |
| 751 | }; |
| 752 | |
| 753 | |
| 754 | /* |
| 755 | * Primary callback interface for interaction between client and |
| 756 | * server session ("ServiceFactory"). |
| 757 | */ |
| 758 | interface ClientCallback |
| 759 | { |
| 760 | |
| 761 | /* |
| 762 | * Heartbeat-check made by the server to guarantee that the client |
| 763 | * is alive. |
| 764 | */ |
| 765 | bool ping(); |
| 766 | |
| 767 | /* |
| 768 | * Message that the server will be shutting down in the |
| 769 | * given number of milliseconds, after which all new and |
| 770 | * running method invocations will recieve a CancelledException. |
| 771 | */ |
| 772 | void shutdownIn(long milliseconds); |
| 773 | }; |
| 774 | |
| 775 | /* |
| 776 | * Starting point for all OMERO.blitz interaction. Similar to the |
| 777 | * ome.system.ServiceFactory class in the OMERO.server and its |
| 778 | * RMI/Java clients, this ServiceFactory once properly created |
| 779 | * creates functioning proxies to the server. |
| 780 | * |
| 781 | * The difference between the two types is that the blitz instance |
| 782 | * sits server-side. |
| 783 | */ |
| 784 | interface ServiceFactory extends Glacier2::Session |
| 785 | { |
| 786 | // Central OMERO.blitz stateless services. |
| 787 | IAdmin* getAdminService() throws ServerError; |
| 788 | IConfig* getConfigService() throws ServerError; |
| 789 | IDelete* getDeleteService() throws ServerError; |
| 790 | ILdap* getLdapService() throws ServerError; |
| 791 | IPixels* getPixelsService() throws ServerError; |
| 792 | IPojos* getPojosService() throws ServerError; |
| 793 | IProjection* getProjectionService() throws ServerError; |
| 794 | IQuery* getQueryService() throws ServerError; |
| 795 | IRenderingSettings* getRenderingSettingsService() throws ServerError; |
| 796 | IRepositoryInfo* getRepositoryInfoService() throws ServerError; |
| 797 | IScript* getScriptService() throws ServerError; |
| 798 | ISession* getSessionService() throws ServerError; |
| 799 | IShare* getShareService() throws ServerError; |
| 800 | ITimeline* getTimelineService() throws ServerError; |
| 801 | ITypes* getTypesService() throws ServerError; |
| 802 | IUpdate* getUpdateService() throws ServerError; |
| 803 | |
| 804 | // Central OMERO.blitz stateful services. |
| 805 | Gateway *createGateway() throws ServerError; |
| 806 | JobHandle* createJobHandle() throws ServerError; |
| 807 | RawFileStore* createRawFileStore() throws ServerError; |
| 808 | RawPixelsStore* createRawPixelsStore() throws ServerError; |
| 809 | RenderingEngine* createRenderingEngine() throws ServerError; |
| 810 | Search* createSearchService() throws ServerError; |
| 811 | ThumbnailStore* createThumbnailStore() throws ServerError; |
| 812 | |
| 813 | /* |
| 814 | * Allows looking up any service by name. See Constants.ice |
| 815 | * for examples of services. If a service has been added |
| 816 | * by third-parties, getByName can be used even though |
| 817 | * no concrete method is available. |
| 818 | */ |
| 819 | |
| 820 | ServiceInterface* getByName(string name) throws ServerError; |
| 821 | |
| 822 | StatefulServiceInterface* createByName(string name) throws ServerError; |
| 823 | |
| 824 | // Shared resources. Here an acquisition framework is |
| 825 | // in place such that it is not guaranteed that |
| 826 | |
| 827 | omero::grid::InteractiveProcessor* |
| 828 | acquireProcessor(omero::model::Job job, int seconds) |
| 829 | throws ServerError; |
| 830 | |
| 831 | /* |
| 832 | * Sets the single callback used by the ServiceFactory |
| 833 | * to communicate with the client application. A default |
| 834 | * callback is set by the omero::client object on |
| 835 | * session creation which should suffice for most usage. |
| 836 | * |
| 837 | * See the client object's documentation in each language |
| 838 | * mapping for ways to use the callback. |
| 839 | */ |
| 840 | void setCallback(ClientCallback* callback); |
| 841 | |
| 842 | /* |
| 843 | * Deprecated misnomer. |
| 844 | */ |
| 845 | ["deprecated:close() is deprecated. use closeOnDestroy() instead."] void close(); |
| 846 | |
| 847 | /* |
| 848 | * Marks the session for closure rather than detachment, which will |
| 849 | * be triggered by the destruction of the Glacier2 connection via |
| 850 | * router.destroySession() |
| 851 | * |
| 852 | * Closing the session rather the detaching is more secure, since all |
| 853 | * resources are removed from the server and can safely be set once |
| 854 | * it is clear that a client is finished with those resources. |
| 855 | */ |
| 856 | void closeOnDestroy(); |
| 857 | |
| 858 | /* |
| 859 | * Marks the session for detachment rather than closure, which will |
| 860 | * be triggered by the destruction of the Glacier2 connection via |
| 861 | * router.destroySession() |
| 862 | * |
| 863 | * This is the default and allows a lost session to be reconnected, |
| 864 | * at a slight security cost since the session will persist longer |
| 865 | * and can be used by others if the UUID is intercepted. |
| 866 | */ |
| 867 | void detachOnDestroy(); |
| 868 | |
| 869 | // Session management |
| 870 | |
| 871 | /* |
| 872 | * Returns a list of string ids for currently active services. This will |
| 873 | * _not_ keep services alive, and in fact checks for all expired services |
| 874 | * and removes them. |
| 875 | */ |
| 876 | StringSet activeServices(); |
| 877 | |
| 878 | /* |
| 879 | * Requests that the given services be marked as alive. It is |
| 880 | * possible that one of the services has already timed out, in which |
| 881 | * case the returned long value will be non-zero. |
| 882 | * |
| 883 | * Specifically, the bit representing the 0-based index will be 1: |
| 884 | * |
| 885 | * if (retval & 1<<idx == 1<<idx) { // not alive } |
| 886 | * |
| 887 | * Except for fatal server or session errors, this method should never |
| 888 | * throw an exception. |
| 889 | */ |
| 890 | long keepAllAlive(ServiceList proxies); |
| 891 | |
| 892 | /* |
| 893 | * Returns true if the given service is alive. |
| 894 | * |
| 895 | * Except for fatal server or session errors, this method should never |
| 896 | * throw an exception. |
| 897 | */ |
| 898 | bool keepAlive(ServiceInterface* proxy); |
| 899 | |
| 900 | }; |
| 901 | |
| 902 | }; |
| 903 | }; |
| 904 | |
| 905 | #endif |
Note: See TracBrowser
for help on using the browser.
