public class ServiceUtilities extends Object
Constructor and Description |
---|
ServiceUtilities() |
Modifier and Type | Method and Description |
---|---|
static String |
cause(Throwable t) |
static <T extends omero.model.IObject> |
collectionCast(Class<T> klass,
List<omero.model.IObject> list)
Helper method for the conversion of base types in containers(normally
of type IObject) to a concrete type.
|
static String |
convertPojos(omero.api.ContainerClass nodeType)
Converts the specified POJO into the corresponding model.
|
static void |
handleException(Throwable t,
String message)
Helper method to handle exceptions thrown by the connection library.
|
static String |
printErrorText(Throwable e)
Utility method to print the error message
|
public static <T extends omero.model.IObject> List<T> collectionCast(Class<T> klass, List<omero.model.IObject> list)
T
- new type.klass
- new type class.list
- container.public static String convertPojos(omero.api.ContainerClass nodeType)
nodeType
- The POJO class.public static void handleException(Throwable t, String message) throws omero.ServerError
t
- The exception.message
- The context message.DSOutOfServiceException
- A connection problem.DSAccessException
- A server-side error.omero.ServerError
Version: 4.4.12-ice34-b116
Copyright © 2014 The University of Dundee & Open Microscopy Environment. All Rights Reserved.