/** * <p>setBuilding</p> * * @param building a {@link java.lang.String} object. */ public void setBuilding(final String building) { m_currentNode.getAssetRecord().setBuilding(building); }
protected SaveOrUpdateOperation(Integer nodeId, String foreignSource, String foreignId, String nodeLabel, String location, String building, String city, ProvisionService provisionService, String rescanExisting) { super(provisionService); m_node = new OnmsNode(); m_node.setLocation(Strings.isNullOrEmpty(location) ? new OnmsMonitoringLocation(MonitoringLocationDao.DEFAULT_MONITORING_LOCATION_ID, MonitoringLocationDao.DEFAULT_MONITORING_LOCATION_ID) : new OnmsMonitoringLocation(location, location)); m_node.setLabel(nodeLabel); m_node.setId(nodeId); m_node.setLabelSource(NodeLabelSource.USER); m_node.setType(NodeType.ACTIVE); m_node.setForeignSource(foreignSource); m_node.setForeignId(foreignId); m_node.getAssetRecord().setBuilding(building); m_node.getAssetRecord().setCity(city); m_rescanExisting = rescanExisting; }
protected SaveOrUpdateOperation(Integer nodeId, String foreignSource, String foreignId, String nodeLabel, String location, String building, String city, ProvisionService provisionService, String rescanExisting) { super(provisionService); m_node = new OnmsNode(); m_node.setLocation(Strings.isNullOrEmpty(location) ? new OnmsMonitoringLocation(MonitoringLocationDao.DEFAULT_MONITORING_LOCATION_ID, MonitoringLocationDao.DEFAULT_MONITORING_LOCATION_ID) : new OnmsMonitoringLocation(location, location)); m_node.setLabel(nodeLabel); m_node.setId(nodeId); m_node.setLabelSource(NodeLabelSource.USER); m_node.setType(NodeType.ACTIVE); m_node.setForeignSource(foreignSource); m_node.setForeignId(foreignId); m_node.getAssetRecord().setBuilding(building); m_node.getAssetRecord().setCity(city); m_rescanExisting = rescanExisting; }
/** * <p>Constructor for AbstractSaveOrUpdateOperation.</p> * * @param nodeId a {@link java.lang.Integer} object. * @param foreignSource a {@link java.lang.String} object. * @param foreignId a {@link java.lang.String} object. * @param nodeLabel a {@link java.lang.String} object. * @param building a {@link java.lang.String} object. * @param city a {@link java.lang.String} object. */ public AbstractSaveOrUpdateOperation(final Integer nodeId, final String foreignSource, final String foreignId, final String nodeLabel, final String building, final String city) { m_node = new OnmsNode(); m_node.setId(nodeId); m_node.setLabel(nodeLabel); m_node.setLabelSource("U"); m_node.setType("A"); m_node.setForeignSource(foreignSource); m_node.setForeignId(foreignId); m_node.getAssetRecord().setBuilding(building); m_node.getAssetRecord().setCity(city); }
@Override public void visitNode(final OnmsNodeRequisition nodeReq) { final NodeBuilder nodeBldr = bldr.addNode(nodeReq.getNodeLabel()); nodeBldr.setLabelSource(NodeLabelSource.USER); nodeBldr.setType(NodeType.ACTIVE); nodeBldr.setForeignSource(nodeReq.getForeignSource()); nodeBldr.setForeignId(nodeReq.getForeignId()); nodeBldr.setLocation(nodeReq.getLocation()); nodeBldr.getAssetRecord().setBuilding(nodeReq.getBuilding()); nodeBldr.getAssetRecord().getGeolocation().setCity(nodeReq.getCity()); }