use of org.opennms.netmgt.model.events.UpdateEventVisitor in project opennms by OpenNMS.
the class DefaultProvisionService method updateNode.
/**
* {@inheritDoc}
*/
@Transactional
@Override
public void updateNode(final OnmsNode node, String rescanExisting) {
updateLocation(node);
final OnmsNode dbNode = m_nodeDao.getHierarchy(node.getId());
// on an update, leave categories alone, let the NodeScan handle applying requisitioned categories
node.setCategories(dbNode.getCategories());
final EventAccumulator accumulator = new EventAccumulator(m_eventForwarder);
dbNode.mergeNode(node, accumulator, false);
updateNodeHostname(dbNode);
m_nodeDao.update(dbNode);
m_nodeDao.flush();
accumulator.flush();
final EntityVisitor eventAccumlator = new UpdateEventVisitor(m_eventForwarder, rescanExisting);
dbNode.visit(eventAccumlator);
}
Aggregations