use of org.irods.jargon.core.connection.IrodsVersion in project metalnx-web by irods-contrib.
the class IRODSServicesImpl method findIRodsVersion.
@Override
public String findIRodsVersion() throws DataGridConnectionRefusedException {
String version = "";
try {
EnvironmentalInfoAO envInfoAO = irodsAccessObjectFactory.getEnvironmentalInfoAO(irodsAccount);
IrodsVersion iv = envInfoAO.getIRODSServerPropertiesFromIRODSServer().getIrodsVersion();
version = String.format("%s.%s.%s", iv.getMajorAsString(), iv.getMinorAsString(), iv.getPatchAsString());
} catch (JargonException e) {
logger.error("Could not find iRODS version: ", e);
if (e.getCause() instanceof ConnectException) {
throw new DataGridConnectionRefusedException(e.getMessage());
}
}
return version;
}
Aggregations