code: private void handleEvent(SiteNode parent, SiteNode node, EventType eventType) {
  		switch (eventType) {
  		case ADD:
  			publishEvent(SiteMapEventPublisher.SITE_NODE_ADDED_EVENT, node);
  			if (parent == getRoot()) {
  				publishEvent(SiteMapEventPublisher.SITE_ADDED_EVENT, node);
  			}
  			break;
  		case REMOVE:
  			publishEvent(SiteMapEventPublisher.SITE_NODE_REMOVED_EVENT, node);
  			if(parent == getRoot()) {
  				publishEvent(SiteMapEventPublisher.SITE_REMOVED_EVENT, node);
  			}
  		}
  	}
docs: Handles the publishing of the add or remove event. Node events are always published.
  Site events are only published when the parent of the node is the root of the tree.
  
  @param parent relevant parent node
  @param node the site node the action is being carried out for
  @param eventType the type of event occurring (ADD or REMOVE)
  @see EventType
  @since 2.5.0