getManagedRepositoriesPaths(BasicBrowser browser)
throws ExecutionException, AccessException, ServiceException {
String error = "Cannot get managed repositories paths for " + this;
return call(browser.getMetadataFacility(),
@@ -628,7 +628,7 @@ public List download(ConnectionHandler conn, String path)
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public void reload(Browser browser)
+ public void reload(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
data = call(browser.getBrowseFacility(),
b -> b.getImage(browser.getCtx(), getId()),
diff --git a/src/main/java/fr/igred/omero/core/Pixels.java b/src/main/java/fr/igred/omero/core/Pixels.java
index 41bcd959..0fa004f9 100644
--- a/src/main/java/fr/igred/omero/core/Pixels.java
+++ b/src/main/java/fr/igred/omero/core/Pixels.java
@@ -19,7 +19,7 @@
import fr.igred.omero.RemoteObject;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.client.ConnectionHandler;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
@@ -54,12 +54,12 @@ public interface Pixels extends RemoteObject {
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- void loadPlanesInfo(Browser browser)
+ void loadPlanesInfo(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException;
/**
- * Retrieves the planes information (which need to be {@link #loadPlanesInfo(Browser) loaded} first).
+ * Retrieves the planes information (which need to be {@link #loadPlanesInfo(BasicBrowser) loaded} first).
*
* @return See above.
*/
@@ -108,7 +108,7 @@ void loadPlanesInfo(Browser browser)
/**
* Computes the mean time interval from the planes deltaTs.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
@@ -117,7 +117,7 @@ void loadPlanesInfo(Browser browser)
/**
* Computes the mean exposure time for a given channel from the planes exposureTime.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @param channel The channel index.
*
@@ -128,7 +128,7 @@ void loadPlanesInfo(Browser browser)
/**
* Retrieves the X stage position, using the same unit as {@link #getPixelSizeX()} if possible.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
@@ -137,7 +137,7 @@ void loadPlanesInfo(Browser browser)
/**
* Retrieves the Y stage position, using the same unit as {@link #getPixelSizeY()} if possible.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
@@ -146,7 +146,7 @@ void loadPlanesInfo(Browser browser)
/**
* Retrieves the Z stage position, using the same unit as {@link #getPixelSizeZ()} if possible.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
diff --git a/src/main/java/fr/igred/omero/core/PixelsWrapper.java b/src/main/java/fr/igred/omero/core/PixelsWrapper.java
index d525a7ac..142b1b80 100644
--- a/src/main/java/fr/igred/omero/core/PixelsWrapper.java
+++ b/src/main/java/fr/igred/omero/core/PixelsWrapper.java
@@ -19,7 +19,7 @@
import fr.igred.omero.ObjectWrapper;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.client.ConnectionHandler;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ExceptionHandler;
@@ -148,7 +148,7 @@ private static int[] checkBounds(int[] bounds, int imageSize) {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public void loadPlanesInfo(Browser browser)
+ public void loadPlanesInfo(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
List planes = call(browser.getMetadataFacility(),
m -> m.getPlaneInfos(browser.getCtx(),
@@ -159,7 +159,7 @@ public void loadPlanesInfo(Browser browser)
/**
- * Retrieves the planes information (which need to be {@link #loadPlanesInfo(Browser) loaded} first).
+ * Retrieves the planes information (which need to be {@link #loadPlanesInfo(BasicBrowser) loaded} first).
*
* @return See above.
*/
@@ -226,7 +226,7 @@ public Time getTimeIncrement() {
/**
* Computes the mean time interval from the planes deltaTs.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
@@ -238,7 +238,7 @@ public Time getMeanTimeInterval() {
/**
* Computes the mean exposure time for a given channel from the planes exposureTime.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @param channel The channel index.
*
@@ -252,7 +252,7 @@ public Time getMeanExposureTime(int channel) {
/**
* Retrieves the X stage position, using the same unit as {@link #getPixelSizeX()} if possible.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
@@ -276,7 +276,7 @@ public Length getPositionX() {
/**
* Retrieves the Y stage position, using the same unit as {@link #getPixelSizeY()} if possible.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
@@ -300,7 +300,7 @@ public Length getPositionY() {
/**
* Retrieves the Z stage position, using the same unit as {@link #getPixelSizeZ()} if possible.
- * Planes information needs to be {@link #loadPlanesInfo(Browser) loaded} first.
+ * Planes information needs to be {@link #loadPlanesInfo(BasicBrowser) loaded} first.
*
* @return See above.
*/
diff --git a/src/main/java/fr/igred/omero/meta/BasicAdmin.java b/src/main/java/fr/igred/omero/meta/BasicAdmin.java
new file mode 100644
index 00000000..19552870
--- /dev/null
+++ b/src/main/java/fr/igred/omero/meta/BasicAdmin.java
@@ -0,0 +1,43 @@
+package fr.igred.omero.meta;
+
+
+import fr.igred.omero.exception.AccessException;
+import fr.igred.omero.exception.ServiceException;
+import omero.api.IAdminPrx;
+import omero.gateway.SecurityContext;
+import omero.gateway.facility.AdminFacility;
+
+import java.util.concurrent.ExecutionException;
+
+
+public interface BasicAdmin {
+
+ /**
+ * Returns the current {@link SecurityContext}.
+ *
+ * @return See above
+ */
+ SecurityContext getCtx();
+
+
+ /**
+ * Gets the {@link AdminFacility} to use admin specific function.
+ *
+ * @return See above.
+ *
+ * @throws ExecutionException If the AdminFacility can't be retrieved or instantiated.
+ */
+ AdminFacility getAdminFacility() throws ExecutionException;
+
+
+ /**
+ * Returns the {@link IAdminPrx} to use admin specific function.
+ *
+ * @return See above.
+ *
+ * @throws AccessException Cannot access data.
+ * @throws ServiceException Cannot connect to OMERO.
+ */
+ IAdminPrx getAdminService() throws AccessException, ServiceException;
+
+}
diff --git a/src/main/java/fr/igred/omero/meta/Experimenter.java b/src/main/java/fr/igred/omero/meta/Experimenter.java
index e447913e..a56df79f 100644
--- a/src/main/java/fr/igred/omero/meta/Experimenter.java
+++ b/src/main/java/fr/igred/omero/meta/Experimenter.java
@@ -19,7 +19,6 @@
import fr.igred.omero.RemoteObject;
-import fr.igred.omero.client.AdminManager;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import omero.gateway.model.ExperimenterData;
@@ -193,7 +192,7 @@ public interface Experimenter extends RemoteObject {
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- boolean isAdmin(AdminManager admin)
+ boolean isAdmin(BasicAdmin admin)
throws ServiceException, AccessException, ExecutionException;
}
diff --git a/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java b/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java
index 2c8f891b..7ff58a64 100644
--- a/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java
+++ b/src/main/java/fr/igred/omero/meta/ExperimenterWrapper.java
@@ -19,7 +19,6 @@
import fr.igred.omero.ObjectWrapper;
-import fr.igred.omero.client.AdminManager;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import omero.gateway.model.ExperimenterData;
@@ -251,7 +250,7 @@ public boolean isLeader(Group group) {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public boolean isAdmin(AdminManager admin)
+ public boolean isAdmin(BasicAdmin admin)
throws ServiceException, AccessException, ExecutionException {
return !call(admin.getAdminFacility(),
a -> a.getAdminPrivileges(admin.getCtx(), data),
diff --git a/src/main/java/fr/igred/omero/roi/ROI.java b/src/main/java/fr/igred/omero/roi/ROI.java
index 42e8932e..94f452b8 100644
--- a/src/main/java/fr/igred/omero/roi/ROI.java
+++ b/src/main/java/fr/igred/omero/roi/ROI.java
@@ -19,7 +19,7 @@
import fr.igred.omero.Annotatable;
-import fr.igred.omero.client.DataManager;
+import fr.igred.omero.client.BasicDataManager;
import fr.igred.omero.core.Image;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
@@ -43,6 +43,8 @@
import java.util.function.Supplier;
import java.util.stream.Collectors;
+import static fr.igred.omero.exception.ExceptionHandler.call;
+
/**
* Interface to handle ROIs on OMERO.
@@ -299,7 +301,7 @@ default void addShapes(Iterable extends Shape> shapes) {
* @throws ServiceException Cannot connect to OMERO.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- void saveROI(DataManager dm)
+ void saveROI(BasicDataManager dm)
throws AccessException, ServiceException, ExecutionException;
@@ -365,7 +367,7 @@ default List toImageJ() {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- default void link(DataManager dm, A annotation)
+ default void link(BasicDataManager dm, A annotation)
throws ServiceException, AccessException, ExecutionException {
RoiAnnotationLink link = new RoiAnnotationLinkI();
link.setChild(annotation.asAnnotation());
diff --git a/src/main/java/fr/igred/omero/roi/ROIWrapper.java b/src/main/java/fr/igred/omero/roi/ROIWrapper.java
index bb37f834..c9c585ba 100644
--- a/src/main/java/fr/igred/omero/roi/ROIWrapper.java
+++ b/src/main/java/fr/igred/omero/roi/ROIWrapper.java
@@ -19,7 +19,7 @@
import fr.igred.omero.AnnotatableWrapper;
-import fr.igred.omero.client.DataManager;
+import fr.igred.omero.client.BasicDataManager;
import fr.igred.omero.core.Image;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
@@ -40,6 +40,7 @@
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
+import static fr.igred.omero.exception.ExceptionHandler.call;
import static java.util.stream.Collectors.groupingBy;
@@ -272,9 +273,11 @@ public void deleteShape(int pos) {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public void saveROI(DataManager dm)
+ public void saveROI(BasicDataManager dm)
throws AccessException, ServiceException, ExecutionException {
- Roi roi = (Roi) dm.save(data.asIObject());
+ Roi roi = (Roi) call(dm.getDMFacility(),
+ d -> d.saveAndReturnObject(dm.getCtx(), data.asIObject()),
+ "Cannot save object");
data = new ROIData(roi);
}
diff --git a/src/main/java/fr/igred/omero/roi/Shape.java b/src/main/java/fr/igred/omero/roi/Shape.java
index 277a054f..b4c22e4c 100644
--- a/src/main/java/fr/igred/omero/roi/Shape.java
+++ b/src/main/java/fr/igred/omero/roi/Shape.java
@@ -19,7 +19,7 @@
import fr.igred.omero.Annotatable;
-import fr.igred.omero.client.DataManager;
+import fr.igred.omero.client.BasicDataManager;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import ij.gui.Roi;
@@ -32,6 +32,7 @@
import java.awt.Color;
import java.util.concurrent.ExecutionException;
+import static fr.igred.omero.exception.ExceptionHandler.call;
import static java.awt.geom.AffineTransform.TYPE_IDENTITY;
@@ -278,7 +279,7 @@ default java.awt.Shape createTransformedAWTShape() {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- default void link(DataManager dm, A annotation)
+ default void link(BasicDataManager dm, A annotation)
throws ServiceException, AccessException, ExecutionException {
ShapeAnnotationLink link = new ShapeAnnotationLinkI();
link.setChild(annotation.asAnnotation());
diff --git a/src/main/java/fr/igred/omero/screen/HCSBrowser.java b/src/main/java/fr/igred/omero/screen/HCSBrowser.java
index 08891675..7698c21c 100644
--- a/src/main/java/fr/igred/omero/screen/HCSBrowser.java
+++ b/src/main/java/fr/igred/omero/screen/HCSBrowser.java
@@ -1,6 +1,7 @@
package fr.igred.omero.screen;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import fr.igred.omero.meta.Experimenter;
@@ -11,22 +12,7 @@
import java.util.concurrent.ExecutionException;
-public interface HCSBrowser {
-
-
- /**
- * Finds objects on OMERO through a database query.
- *
- * @param query The database query.
- *
- * @return A list of OMERO objects.
- *
- * @throws ServiceException Cannot connect to OMERO.
- * @throws AccessException Cannot access data.
- */
- List findByQuery(String query)
- throws ServiceException, AccessException;
-
+public interface HCSBrowser extends BasicBrowser {
/**
* Gets the screen with the specified id from OMERO.
diff --git a/src/main/java/fr/igred/omero/screen/Plate.java b/src/main/java/fr/igred/omero/screen/Plate.java
index e4128c13..bcecf0ce 100644
--- a/src/main/java/fr/igred/omero/screen/Plate.java
+++ b/src/main/java/fr/igred/omero/screen/Plate.java
@@ -20,7 +20,7 @@
import fr.igred.omero.RemoteObject;
import fr.igred.omero.RepositoryObject;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.core.Image;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
@@ -87,7 +87,7 @@ public interface Plate extends RepositoryObject {
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getScreens(Browser browser)
+ default List getScreens(HCSBrowser browser)
throws ServiceException, AccessException, ExecutionException {
String query = "select link.parent from ScreenPlateLink as link" +
" where link.child=" + getId();
@@ -119,7 +119,7 @@ default List getScreens(Browser browser)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- List getWells(Browser browser)
+ List getWells(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException;
@@ -134,7 +134,7 @@ List getWells(Browser browser)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getImages(Browser browser)
+ default List getImages(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
return getWells(browser).stream()
.map(Well::getImages)
diff --git a/src/main/java/fr/igred/omero/screen/PlateAcquisition.java b/src/main/java/fr/igred/omero/screen/PlateAcquisition.java
index 7f09615a..a049271c 100644
--- a/src/main/java/fr/igred/omero/screen/PlateAcquisition.java
+++ b/src/main/java/fr/igred/omero/screen/PlateAcquisition.java
@@ -19,8 +19,8 @@
import fr.igred.omero.RepositoryObject;
-import fr.igred.omero.client.Browser;
-import fr.igred.omero.client.DataManager;
+import fr.igred.omero.client.BasicBrowser;
+import fr.igred.omero.client.BasicDataManager;
import fr.igred.omero.core.Image;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
@@ -83,7 +83,7 @@ public interface PlateAcquisition extends RepositoryObject {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- default void link(DataManager dm, A annotation)
+ default void link(BasicDataManager dm, A annotation)
throws ServiceException, AccessException, ExecutionException {
PlateAcquisitionAnnotationLink link = new PlateAcquisitionAnnotationLinkI();
link.setChild(annotation.asAnnotation());
@@ -103,7 +103,7 @@ default void link(DataManager dm, A annotation)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getScreens(Browser browser)
+ default List getScreens(HCSBrowser browser)
throws ServiceException, AccessException, ExecutionException {
Plate plate = browser.getPlate(getRefPlateId());
return plate.getScreens(browser);
@@ -138,7 +138,7 @@ default List getPlates(HCSBrowser browser)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getWells(Browser browser)
+ default List getWells(HCSBrowser browser)
throws ServiceException, AccessException, ExecutionException {
return getPlates(browser).iterator().next().getWells(browser);
}
@@ -162,7 +162,7 @@ default List getWells(Browser browser)
* @throws ServiceException Cannot connect to OMERO.
* @throws AccessException Cannot access data.
*/
- default List getWellSamples(Browser browser)
+ default List getWellSamples(BasicBrowser browser)
throws AccessException, ServiceException {
reload(browser);
return getWellSamples();
@@ -191,7 +191,7 @@ default List getImages() {
* @throws ServiceException Cannot connect to OMERO.
* @throws AccessException Cannot access data.
*/
- default List getImages(Browser browser)
+ default List getImages(BasicBrowser browser)
throws ServiceException, AccessException {
return getWellSamples(browser).stream()
.map(WellSample::getImage)
@@ -256,7 +256,7 @@ default List getImages(Browser browser)
* @throws AccessException Cannot access data.
*/
@Override
- void reload(Browser browser)
+ void reload(BasicBrowser browser)
throws ServiceException, AccessException;
}
diff --git a/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java b/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java
index 69365829..75eaea6a 100644
--- a/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java
+++ b/src/main/java/fr/igred/omero/screen/PlateAcquisitionWrapper.java
@@ -19,7 +19,7 @@
import fr.igred.omero.RepositoryObjectWrapper;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import omero.gateway.model.PlateAcquisitionData;
@@ -212,7 +212,7 @@ public int getMaximumFieldCount() {
* @throws AccessException Cannot access data.
*/
@Override
- public void reload(Browser browser)
+ public void reload(BasicBrowser browser)
throws ServiceException, AccessException {
String query = "select pa from PlateAcquisition as pa " +
" left outer join fetch pa.plate as p" +
diff --git a/src/main/java/fr/igred/omero/screen/PlateWrapper.java b/src/main/java/fr/igred/omero/screen/PlateWrapper.java
index c154973b..dab5be9c 100644
--- a/src/main/java/fr/igred/omero/screen/PlateWrapper.java
+++ b/src/main/java/fr/igred/omero/screen/PlateWrapper.java
@@ -19,7 +19,7 @@
import fr.igred.omero.RepositoryObjectWrapper;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import ome.model.units.BigResult;
@@ -135,7 +135,7 @@ public List getPlateAcquisitions() {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public List getWells(Browser browser)
+ public List getWells(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
Collection wells = call(browser.getBrowseFacility(),
bf -> bf.getWells(browser.getCtx(),
@@ -289,7 +289,7 @@ public Length getWellOriginY(UnitsLength unit) throws BigResult {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public void reload(Browser browser)
+ public void reload(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
data = call(browser.getBrowseFacility(),
bf -> bf.getPlates(browser.getCtx(), singletonList(getId()))
diff --git a/src/main/java/fr/igred/omero/screen/Screen.java b/src/main/java/fr/igred/omero/screen/Screen.java
index 0fa823f1..e53262dd 100644
--- a/src/main/java/fr/igred/omero/screen/Screen.java
+++ b/src/main/java/fr/igred/omero/screen/Screen.java
@@ -19,7 +19,7 @@
import fr.igred.omero.RepositoryObject;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.client.ConnectionHandler;
import fr.igred.omero.core.Image;
import fr.igred.omero.exception.AccessException;
@@ -107,7 +107,7 @@ default List getPlates(String name) {
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getPlateAcquisitions(Browser browser)
+ default List getPlateAcquisitions(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
reload(browser);
return getPlates().stream()
@@ -133,7 +133,7 @@ default List getPlateAcquisitions(Browser browser)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getWells(Browser browser)
+ default List getWells(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
List plates = getPlates();
Collection> wells = new ArrayList<>(plates.size());
@@ -155,7 +155,7 @@ default List getWells(Browser browser)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getImages(Browser browser)
+ default List getImages(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
List plates = getPlates();
Collection> images = new ArrayList<>(plates.size());
diff --git a/src/main/java/fr/igred/omero/screen/ScreenWrapper.java b/src/main/java/fr/igred/omero/screen/ScreenWrapper.java
index 56e148fa..f752a2f5 100644
--- a/src/main/java/fr/igred/omero/screen/ScreenWrapper.java
+++ b/src/main/java/fr/igred/omero/screen/ScreenWrapper.java
@@ -19,9 +19,9 @@
import fr.igred.omero.RepositoryObjectWrapper;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
+import fr.igred.omero.client.BasicDataManager;
import fr.igred.omero.client.ConnectionHandler;
-import fr.igred.omero.client.DataManager;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import omero.gateway.model.ScreenData;
@@ -52,7 +52,7 @@ public class ScreenWrapper extends RepositoryObjectWrapper implement
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- public ScreenWrapper(DataManager dm, String name, String description)
+ public ScreenWrapper(BasicDataManager dm, String name, String description)
throws ServiceException, AccessException, ExecutionException {
super(new ScreenData());
data.setName(name);
@@ -237,7 +237,7 @@ public void setReagentSetIdentifier(String value) {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public void reload(Browser browser)
+ public void reload(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
data = call(browser.getBrowseFacility(),
bf -> bf.getScreens(browser.getCtx(),
diff --git a/src/main/java/fr/igred/omero/screen/Well.java b/src/main/java/fr/igred/omero/screen/Well.java
index d3f0c0a7..bed5d62c 100644
--- a/src/main/java/fr/igred/omero/screen/Well.java
+++ b/src/main/java/fr/igred/omero/screen/Well.java
@@ -19,7 +19,6 @@
import fr.igred.omero.RepositoryObject;
-import fr.igred.omero.client.Browser;
import fr.igred.omero.core.Image;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
@@ -67,7 +66,7 @@ public interface Well extends RepositoryObject {
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getScreens(Browser browser)
+ default List getScreens(HCSBrowser browser)
throws ServiceException, AccessException, ExecutionException {
reload(browser);
return getPlate().getScreens(browser);
@@ -93,7 +92,7 @@ default List getScreens(Browser browser)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getPlateAcquisitions(Browser browser)
+ default List getPlateAcquisitions(HCSBrowser browser)
throws ServiceException, AccessException, ExecutionException {
reload(browser);
return browser.getPlate(getPlate().getId()).getPlateAcquisitions();
diff --git a/src/main/java/fr/igred/omero/screen/WellSample.java b/src/main/java/fr/igred/omero/screen/WellSample.java
index e30ebe3c..16b5f054 100644
--- a/src/main/java/fr/igred/omero/screen/WellSample.java
+++ b/src/main/java/fr/igred/omero/screen/WellSample.java
@@ -19,7 +19,7 @@
import fr.igred.omero.RemoteObject;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.core.Image;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
@@ -58,7 +58,7 @@ public interface WellSample extends RemoteObject {
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getScreens(Browser browser)
+ default List getScreens(HCSBrowser browser)
throws ServiceException, AccessException, ExecutionException {
return getWell(browser).getScreens(browser);
}
@@ -100,7 +100,7 @@ default List getPlates(HCSBrowser browser)
* @throws AccessException Cannot access data.
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
- default List getPlateAcquisitions(Browser browser)
+ default List getPlateAcquisitions(HCSBrowser browser)
throws ServiceException, AccessException, ExecutionException {
return getWell(browser).getPlateAcquisitions(browser);
}
@@ -179,7 +179,7 @@ default Well getWell(HCSBrowser browser)
* @throws ServiceException Cannot connect to OMERO.
* @throws AccessException Cannot access data.
*/
- void reload(Browser browser)
+ void reload(BasicBrowser browser)
throws ServiceException, AccessException;
}
diff --git a/src/main/java/fr/igred/omero/screen/WellSampleWrapper.java b/src/main/java/fr/igred/omero/screen/WellSampleWrapper.java
index 23b1e738..2e2c3cdf 100644
--- a/src/main/java/fr/igred/omero/screen/WellSampleWrapper.java
+++ b/src/main/java/fr/igred/omero/screen/WellSampleWrapper.java
@@ -19,7 +19,7 @@
import fr.igred.omero.ObjectWrapper;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.core.Image;
import fr.igred.omero.core.ImageWrapper;
import fr.igred.omero.exception.AccessException;
@@ -131,8 +131,7 @@ public long getStartTime() {
* @throws ServiceException Cannot connect to OMERO.
* @throws AccessException Cannot access data.
*/
- @Override
- public void reload(Browser browser)
+ public void reload(BasicBrowser browser)
throws ServiceException, AccessException {
String query = "select ws from WellSample as ws" +
" left outer join fetch ws.plateAcquisition as pa" +
diff --git a/src/main/java/fr/igred/omero/screen/WellWrapper.java b/src/main/java/fr/igred/omero/screen/WellWrapper.java
index b097d1d0..5bbb9abb 100644
--- a/src/main/java/fr/igred/omero/screen/WellWrapper.java
+++ b/src/main/java/fr/igred/omero/screen/WellWrapper.java
@@ -19,7 +19,7 @@
import fr.igred.omero.RepositoryObjectWrapper;
-import fr.igred.omero.client.Browser;
+import fr.igred.omero.client.BasicBrowser;
import fr.igred.omero.exception.AccessException;
import fr.igred.omero.exception.ServiceException;
import omero.gateway.model.WellData;
@@ -290,7 +290,7 @@ public void setAlpha(Integer alpha) {
* @throws ExecutionException A Facility can't be retrieved or instantiated.
*/
@Override
- public void reload(Browser browser)
+ public void reload(BasicBrowser browser)
throws ServiceException, AccessException, ExecutionException {
data = call(browser.getBrowseFacility(),
bf -> bf.getWells(browser.getCtx(),