public void setEvseId(EvseId evseId) { this.evseId = evseId.getId(); }
@EventHandler public void handle(ChargingStationConfiguredEvent event) { LOG.debug("ChargingStationConfiguredEvent for [{}] received!", event.getChargingStationId()); ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId()); if (chargingStation != null) { for (io.motown.domain.api.chargingstation.Evse coreEvse : event.getEvses()) { Evse evse = new Evse(coreEvse.getEvseId().getId()); for (Connector coreConnector : coreEvse.getConnectors()) { io.motown.operatorapi.viewmodel.persistence.entities.Connector connector = new io.motown.operatorapi.viewmodel.persistence.entities.Connector( coreConnector.getMaxAmp(), coreConnector.getPhase(), coreConnector.getVoltage(), coreConnector.getChargingProtocol(), coreConnector.getCurrent(), coreConnector.getConnectorType() ); evse.getConnectors().add(connector); } chargingStation.getEvses().add(evse); } chargingStation.setConfigured(true); repository.createOrUpdate(chargingStation); } else { LOG.error("operator api repo COULD NOT FIND CHARGEPOINT {} and configure it", event.getChargingStationId()); } }