Examples of ConflictException


Examples of org.apache.slide.macro.ConflictException

                    + txId
                    + " for rollback",
                LOG_CHANNEL,
                Logger.INFO);

            throw new ServiceAccessException(this, new ConflictException(uri));

        } else {

            try {
                rm.markTransactionForRollback(txId);
View Full Code Here

Examples of org.candlepin.common.exceptions.ConflictException

    @POST
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public User createUser(User user) {
        if (userService.findByLogin(user.getUsername()) != null) {
            throw new ConflictException("user " + user.getUsername() + " already exists");
        }
        return userService.createUser(user);
    }
View Full Code Here

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

Examples of org.jivesoftware.openfire.muc.ConflictException

            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

Examples of org.jivesoftware.openfire.muc.ConflictException

                }
            }
            // 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

Examples of org.jivesoftware.openfire.muc.ConflictException

                    && 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

Examples of org.jivesoftware.openfire.muc.ConflictException

                    && 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

Examples of org.jivesoftware.openfire.muc.ConflictException

            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

Examples of org.jivesoftware.openfire.muc.ConflictException

          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
Copyright © 2018 www.massapi.com. 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.