@RestController @RequestMapping(value="/ome/import") @Scope(value="request") public class ImportController extends java.lang.Object
|Modifier and Type||Field and Description|
|Constructor and Description|
|Modifier and Type||Method and Description|
Adds the given requests to the import queue.
public static final java.lang.String ImportUrl
@RequestMapping(method=POST, consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<java.lang.Object> enqueue(@RequestBody ImportRequest data)
The requested imports will be queued and will be processed as soon as resources are available; this method returns immediately so that the client doesn't have to wait for the imports to complete.
An outcome notification will be sent to the email address specified in the requests. (For now we assume all requests have the same email address, but going forward this method should work even with possibly unrelated import requests.) This notification is just a one-liner success message when all the submitted data are imported successfully into OMERO. Otherwise, if some of the data failed to import, then a more detailed message is sent that specifies which imports failed and which succeeded.
Each request must contain a valid OMERO session key that the client has acquired before hand; the corresponding OMERO session will be used to import the data and then closed by the server. The same session key may be shared by any of the submitted requests.
This method returns a
200 HTTP message when:
nullor empty or only contains
nullelements. In this case the body of the message is a JSON empty array.
nullrequests and each of them is valid according to the fields specification of
ImportRequest. (This method filters out any
nullelement and only processes non-
nullobjects.) The body of the returned message is a JSON-serialised array of
ImportResponses, one response for each (non-
null) request. Note that the returned response objects may be in a different order than the one of the requests passed into this method's input array.
This method returns a
400 HTTP message when:
nullrequests but some of them fails validation. In this case, the body of the message is a JSON-serialised instance of
Errorwhich details the detected validation errors for each request that didn't pass validation.