@Override public Networks list() { Networks networks = mapCollection(getNetworks(), LinkHelper.NO_PARENT); for (Network network : networks.getNetworks()) { network.setDisplay(null); } return networks; }
@Override public Network get() { org.ovirt.engine.core.common.businessentities.network.Network entity = parent.lookupNetwork(guid); if (entity == null) { return notFound(); } Network network = map(entity); network.setDisplay(null); return addLinks(network, LinkHelper.NO_PARENT); }
@Override public Networks list() { Networks networks; // Specifying LinkHelper.NO_PARENT to explicitly point link to API root: // <network href=".../api/networks/xxx"> // rather than under datacenter: // <network href=".../api/datacenters/yyy/networks/xxx"> // // If LinkHelper.NO_PARENT were not specified, the href including the // datacenter would be seleced by default because the the network spec // includes the datacenter-id. if (isFiltered()) { networks = mapCollection(getBackendCollection(queryType, getQueryParameters(), SearchType.Network), LinkHelper.NO_PARENT); } else { networks = mapCollection(getBackendCollection(SearchType.Network), LinkHelper.NO_PARENT); } for (Network network : networks.getNetworks()) { network.setDisplay(null); } return networks; }
private Network getModel(int i) { Network network = new Network(); network.setId(GUIDS[i].toString()); network.setName(NAMES[i]); network.setDisplay(true); return network; } protected void verifyUpdate(Network model) {
model.setStatus(mapNetworkStatus(entity.getCluster().getStatus())); model.setDisplay(entity.getCluster().isDisplay()); model.setRequired(entity.getCluster().isRequired());
to.setDisplay(from.isDisplay());