private void handleItemChanged(final RosterItem item) {
final RosterItem old = getItemByJID(item.getJID());
if (old == null) { // new item
storeItem(item);
eventBus.fireEventFromSource(new RosterItemChangedEvent(ChangeType.added, item), this);
} else { // update or remove
final SubscriptionState subscriptionState = item.getSubscriptionState();
if (subscriptionState == SubscriptionState.remove) {
removeItem(old);
eventBus.fireEventFromSource(new RosterItemChangedEvent(ChangeType.removed, old), this);
} else {
updateExistingItem(old, item);
eventBus.fireEventFromSource(new RosterItemChangedEvent(ChangeType.modified, old), this);
}
}
}