* @return null as no such data is needed. */ public String getPersistentData() { return null; } /** * Determines whether or not this contact group has been resolved against * the server. Unresolved group are used when initially loading a contact * list that has been stored in a local file until the presence operation * set has managed to retrieve all the contact list from the server and has * properly mapped contacts and groups to their corresponding on-line * buddies. * @return true if the contact has been resolved (mapped against a buddy) * and false otherwise. */ public boolean isResolved() { return isResolved; } /** * Resolve this contact group against the specified group * @param source the server stored group */ void setResolved(RosterGroup source) { if(isResolved) return; this.isResolved = true; this.id = source.getName(); for (RosterEntry item : source.getEntries()) { ContactJabberImpl contact = ssclCallback.findContactById(item.getUser()); // some services automatically adds contacts from an addressbook // to our roster and this contacts are with subscription none. // if such already exist, remove it. This is typically our // own contact if(!ServerStoredContactListJabberImpl.isEntryDisplayable(item)) { if(contact != null) { removeContact(contact); ssclCallback.fireContactRemoved(this, contact); } continue; } if(contact != null) { contact.setResolved(item); ssclCallback.fireContactResolved(this, contact); } else { ContactJabberImpl newContact = new ContactJabberImpl(item, ssclCallback, true, true); addContact(newContact); ssclCallback.fireContactAdded(this, newContact); } } } /** * Returns a String that uniquely represents the group. In this we * use the name of the group as an identifier. This may cause problems * though, in case the name is changed by some other application between * consecutive runs of the sip-communicator. * * @return a String representing this group in a unique and persistent * way. */ public String getUID() { return getGroupName(); } /** * The source group we are encapsulating * @return RosterGroup */ RosterGroup getSourceGroup() { return ssclCallback.getRosterGroup(id); } /** * Change the source group, used when renaming groups. * * @param newGroup RosterGroup */ void setSourceGroup(RosterGroup newGroup) { this.id = newGroup.getName(); } }