Search in sources :

Example 1 with GroupJID

use of org.jivesoftware.openfire.group.GroupJID in project Openfire by igniterealtime.

the class LocalMUCRoom method groupModified.

@Override
public void groupModified(Group group, Map params) {
    // check the affiliation lists for the old group jid, replace with a new group jid
    if ("nameModified".equals(params.get("type"))) {
        GroupJID originalJID = (GroupJID) params.get("originalJID");
        GroupJID newJID = group.getJID();
        try {
            if (owners.contains(originalJID)) {
                addOwner(newJID, getRole());
            } else if (admins.contains(originalJID)) {
                addAdmin(newJID, getRole());
            } else if (outcasts.contains(originalJID)) {
                addOutcast(newJID, null, getRole());
            } else if (members.containsKey(originalJID)) {
                addMember(newJID, null, getRole());
            }
            addNone(originalJID, getRole());
        } catch (Exception ex) {
            Log.error("Failed to update group affiliation for " + newJID, ex);
        }
    }
}
Also used : GroupJID(org.jivesoftware.openfire.group.GroupJID) ForbiddenException(org.jivesoftware.openfire.muc.ForbiddenException) GroupNotFoundException(org.jivesoftware.openfire.group.GroupNotFoundException) RoomLockedException(org.jivesoftware.openfire.muc.RoomLockedException) CannotBeInvitedException(org.jivesoftware.openfire.muc.CannotBeInvitedException) NotAllowedException(org.jivesoftware.openfire.muc.NotAllowedException) UnauthorizedException(org.jivesoftware.openfire.auth.UnauthorizedException) NotFoundException(org.jivesoftware.util.NotFoundException) ConflictException(org.jivesoftware.openfire.muc.ConflictException) RegistrationRequiredException(org.jivesoftware.openfire.muc.RegistrationRequiredException) UserAlreadyExistsException(org.jivesoftware.openfire.user.UserAlreadyExistsException) IOException(java.io.IOException) UserNotFoundException(org.jivesoftware.openfire.user.UserNotFoundException) NotAcceptableException(org.jivesoftware.openfire.muc.NotAcceptableException) ServiceUnavailableException(org.jivesoftware.openfire.muc.ServiceUnavailableException)

Aggregations

IOException (java.io.IOException)1 UnauthorizedException (org.jivesoftware.openfire.auth.UnauthorizedException)1 GroupJID (org.jivesoftware.openfire.group.GroupJID)1 GroupNotFoundException (org.jivesoftware.openfire.group.GroupNotFoundException)1 CannotBeInvitedException (org.jivesoftware.openfire.muc.CannotBeInvitedException)1 ConflictException (org.jivesoftware.openfire.muc.ConflictException)1 ForbiddenException (org.jivesoftware.openfire.muc.ForbiddenException)1 NotAcceptableException (org.jivesoftware.openfire.muc.NotAcceptableException)1 NotAllowedException (org.jivesoftware.openfire.muc.NotAllowedException)1 RegistrationRequiredException (org.jivesoftware.openfire.muc.RegistrationRequiredException)1 RoomLockedException (org.jivesoftware.openfire.muc.RoomLockedException)1 ServiceUnavailableException (org.jivesoftware.openfire.muc.ServiceUnavailableException)1 UserAlreadyExistsException (org.jivesoftware.openfire.user.UserAlreadyExistsException)1 UserNotFoundException (org.jivesoftware.openfire.user.UserNotFoundException)1 NotFoundException (org.jivesoftware.util.NotFoundException)1