use of com.vmware.flowgate.common.model.PduOutlet in project flowgate by vmware.
the class PowerIQService method generatePduOutletString.
private String generatePduOutletString(List<Outlet> pduOutlets) throws JsonProcessingException {
List<PduOutlet> outletsSaveToFlowgate = new ArrayList<PduOutlet>();
for (Outlet outlet : pduOutlets) {
PduOutlet pduoutlet = new PduOutlet();
pduoutlet.setDeviceId(outlet.getDeviceId());
pduoutlet.setId(outlet.getId());
pduoutlet.setName(outlet.getName());
pduoutlet.setOrdinal(outlet.getOrdinal());
pduoutlet.setPduId(outlet.getPduId());
pduoutlet.setRatedAmps(outlet.getRatedAmps());
pduoutlet.setState(outlet.getState());
pduoutlet.setFormatedName(FlowgateConstant.OUTLET_NAME_PREFIX + outlet.getOrdinal());
outletsSaveToFlowgate.add(pduoutlet);
}
return mapper.writeValueAsString(outletsSaveToFlowgate);
}