Package org.jivesoftware.openfire.muc

Examples of org.jivesoftware.openfire.muc.ConflictException


            }
            // If another user attempts to join the room with a nickname reserved by the first user
            // raise a ConflictException
            if (members.containsValue(nickname)) {
                if (!nickname.equals(members.get(user.getAddress().toBareJID()))) {
                    throw new ConflictException();
                }
            }
            if (isLoginRestrictedToNickname()) {
                String reservedNickname = members.get(user.getAddress().toBareJID());
                if (reservedNickname != null && !nickname.equals(reservedNickname)) {
View Full Code Here


            if (MUCRole.Affiliation.owner != sendRole.getAffiliation()) {
                throw new ForbiddenException();
            }
            // Check that the room always has an owner
            if (owners.contains(jid.toBareJID()) && owners.size() == 1) {
                throw new ConflictException();
            }
            // Check if user is already an admin
            if (admins.contains(jid.toBareJID())) {
                // Do nothing
                return Collections.emptyList();
View Full Code Here

                }
            }
            // Check if the desired nickname is already reserved for another member
            if (nickname != null && nickname.trim().length() > 0 && members.containsValue(nickname)) {
                if (!nickname.equals(members.get(jid.toBareJID()))) {
                    throw new ConflictException();
                }
            }
            // Check that the room always has an owner
            if (owners.contains(jid.toBareJID()) && owners.size() == 1) {
                throw new ConflictException();
            }
            // Associate the reserved nickname with the bareJID. If nickname is null then associate an
            // empty string
            members.put(jid.toBareJID(), (nickname == null ? "" : nickname));
            // Remove the user from other affiliation lists
View Full Code Here

                    && MUCRole.Affiliation.owner != senderRole.getAffiliation()) {
                throw new ForbiddenException();
            }
            // Check that the room always has an owner
            if (owners.contains(jid.toBareJID()) && owners.size() == 1) {
                throw new ConflictException();
            }
            // Check if user is already an outcast
            if (outcasts.contains(jid.toBareJID())) {
                // Do nothing
                return Collections.emptyList();
View Full Code Here

                    && MUCRole.Affiliation.owner != senderRole.getAffiliation()) {
                throw new ForbiddenException();
            }
            // Check that the room always has an owner
            if (owners.contains(jid.toBareJID()) && owners.size() == 1) {
                throw new ConflictException();
            }
            wasMember = members.containsKey(jid.toBareJID()) || admins.contains(jid.toBareJID()) || owners.contains(jid.toBareJID());
            // Remove the user from ALL the affiliation lists
            if (removeOwner(jid.toBareJID())) {
                oldAffiliation = MUCRole.Affiliation.owner;
View Full Code Here

            try {
                // Check if all the existing owners are being removed
                if (jids.keySet().containsAll(room.owners)) {
                    // Answer a conflict error if we are only removing ALL the owners
                    if (!jids.containsValue("owner")) {
                        throw new ConflictException();
                    }
                }

                room.lock.readLock().unlock();
                try {
View Full Code Here

          owners.addAll(field.getValues());
        }

        // Answer a conflic error if all the current owners will be removed
        if (ownersSent && owners.isEmpty()) {
            throw new ConflictException();
        }

        // Keep a registry of the updated presences
        List<Presence> presences = new ArrayList<Presence>(admins.size() + owners.size());
View Full Code Here

TOP

Related Classes of org.jivesoftware.openfire.muc.ConflictException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.