use of org.irods.jargon.core.pub.domain.Zone in project metalnx-web by irods-contrib.
the class ZoneServiceImpl method findAll.
@Override
public List<DataGridZone> findAll() throws DataGridConnectionRefusedException {
ZoneAO zoneAO = irodsServices.getZoneAO();
List<DataGridZone> dataGridZones = null;
try {
List<Zone> zones = zoneAO.listZones();
dataGridZones = new ArrayList<DataGridZone>();
for (Zone zone : zones) {
DataGridZone dataGridZone = new DataGridZone();
dataGridZone.setId(Long.valueOf(zone.getZoneId()));
dataGridZone.setName(zone.getZoneName());
dataGridZone.setType(zone.getZoneType());
dataGridZone.setCreateTime(zone.getZoneCreateTime());
dataGridZone.setModifyTime(zone.getZoneModifyTime());
dataGridZone.setConnectionString(zone.getZoneConnection());
dataGridZone.setComment(zone.getZoneComment());
// adding this current zone to the list
dataGridZones.add(dataGridZone);
}
} catch (JargonException e) {
logger.info("Could not find all zones ", e);
}
return dataGridZones;
}
Aggregations