/** * Create a new item to the roster. Roster items may not be created that contain the same user * address as an existing item. * * @param user The item to add to the roster. * @param nickname The nickname for the roster entry (can be null). * @param push True if the new item must be push to the user. * @param persistent True if the new roster item should be persisted to the DB. * @param groups The list of groups to assign this roster item to (can be null) */ public RosterItem createRosterItem(JID user, String nickname, List<String> groups, boolean push, boolean persistent) throws UserAlreadyExistsException, SharedGroupException { return provideRosterItem(user, nickname, groups, push, persistent); }
/** * Create a new item to the roster based as a copy of the given item. * Roster items may not be created that contain the same user address * as an existing item in the roster. * * @param item the item to copy and add to the roster. */ public void createRosterItem(org.xmpp.packet.Roster.Item item) throws UserAlreadyExistsException, SharedGroupException { provideRosterItem(item.getJID(), item.getName(), new ArrayList<>(item.getGroups()), true, true); }
/** * Create a new item to the roster. Roster items may not be created that contain the same user * address as an existing item. * * @param user The item to add to the roster. * @param nickname The nickname for the roster entry (can be null). * @param push True if the new item must be push to the user. * @param persistent True if the new roster item should be persisted to the DB. * @param groups The list of groups to assign this roster item to (can be null) */ public RosterItem createRosterItem(JID user, String nickname, List<String> groups, boolean push, boolean persistent) throws UserAlreadyExistsException, SharedGroupException { return provideRosterItem(user, nickname, groups, push, persistent); }
/** * Create a new item to the roster based as a copy of the given item. * Roster items may not be created that contain the same user address * as an existing item in the roster. * * @param item the item to copy and add to the roster. */ public void createRosterItem(org.xmpp.packet.Roster.Item item) throws UserAlreadyExistsException, SharedGroupException { provideRosterItem(item.getJID(), item.getName(), new ArrayList<>(item.getGroups()), true, true); }