Search in sources :

Example 1 with Zone

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;
}
Also used : DataGridZone(com.emc.metalnx.core.domain.entity.DataGridZone) Zone(org.irods.jargon.core.pub.domain.Zone) DataGridZone(com.emc.metalnx.core.domain.entity.DataGridZone) JargonException(org.irods.jargon.core.exception.JargonException) ZoneAO(org.irods.jargon.core.pub.ZoneAO)

Aggregations

DataGridZone (com.emc.metalnx.core.domain.entity.DataGridZone)1 JargonException (org.irods.jargon.core.exception.JargonException)1 ZoneAO (org.irods.jargon.core.pub.ZoneAO)1 Zone (org.irods.jargon.core.pub.domain.Zone)1