if (rosterItem.getAskSubscriptionType() != null &&
rosterItem.getAskSubscriptionType() != AskSubscriptionType.NOT_SET) {
askSubscriptionTypeValue = rosterItem.getAskSubscriptionType().value();
}
setOrRemoveAttribute(contactNode, "askType", askSubscriptionTypeValue);
contactNode.save();
logger.info("JCR node created/updated: " + contactNode);
} catch (RepositoryException e) {
throw new RosterException("failed to add contact node to roster for user = " + jid.getFullQualifiedName() + " and contact jid = " + rosterItem.getJid().getFullQualifiedName(), e);
}
}