Examples of NotAllowedException


Examples of javax.ws.rs.NotAllowedException

                    break;
                case NOT_FOUND:
                    webAppException = new NotFoundException(response);
                    break;
                case METHOD_NOT_ALLOWED:
                    webAppException = new NotAllowedException(response);
                    break;
                case NOT_ACCEPTABLE:
                    webAppException = new NotAcceptableException(response);
                    break;
                case UNSUPPORTED_MEDIA_TYPE:
View Full Code Here

Examples of javax.ws.rs.NotAllowedException

    }

    private List<Router> getMethodRouter(final ContainerRequest requestContext) {
        List<ConsumesProducesAcceptor> acceptors = consumesProducesAcceptors.get(requestContext.getMethod());
        if (acceptors == null) {
            throw new NotAllowedException(
                    Response.status(Status.METHOD_NOT_ALLOWED).allow(consumesProducesAcceptors.keySet()).build());
        }
        List<ConsumesProducesAcceptor> satisfyingAcceptors = new LinkedList<ConsumesProducesAcceptor>();
        for (ConsumesProducesAcceptor cpi : acceptors) {
            if (cpi.isConsumable(requestContext)) {
View Full Code Here

Examples of org.camunda.bpm.engine.exception.NotAllowedException

    } catch (CaseExecutionNotFoundException e) {
      throw new NotFoundException(e.getMessage(), e);
    } catch (CaseDefinitionNotFoundException e) {
      throw new NotFoundException(e.getMessage(), e);
    } catch (CaseIllegalStateTransitionException e) {
      throw new NotAllowedException(e.getMessage(), e);

    }

  }
View Full Code Here

Examples of org.camunda.bpm.engine.exception.NotAllowedException

    } catch (NullValueException e) {
      throw new NotValidException(e.getMessage(), e);

    } catch (CaseIllegalStateTransitionException e) {
      throw new NotAllowedException(e.getMessage(), e);

    }
  }
View Full Code Here

Examples of org.camunda.bpm.engine.exception.NotAllowedException

    } catch (CaseExecutionNotFoundException e) {
      throw new NotFoundException(e.getMessage(), e);
    } catch (CaseDefinitionNotFoundException e) {
      throw new NotFoundException(e.getMessage(), e);
    } catch (CaseIllegalStateTransitionException e) {
      throw new NotAllowedException(e.getMessage(), e);

    }

  }
View Full Code Here

Examples of org.camunda.bpm.engine.exception.NotAllowedException

    } catch (NullValueException e) {
      throw new NotValidException(e.getMessage(), e);

    } catch (CaseIllegalStateTransitionException e) {
      throw new NotAllowedException(e.getMessage(), e);

    }
  }
View Full Code Here

Examples of org.jivesoftware.openfire.muc.NotAllowedException

                if (element != null) {
                    // Prepare a new presence to be sent to all the room occupants
                    presences.add(new Presence(element, true));
                }
                else {
                    throw new NotAllowedException();
                }
            }
        }
        // Answer all the updated presences
        return presences;
View Full Code Here

Examples of org.jivesoftware.openfire.muc.NotAllowedException

                if (element != null) {
                    // Prepare a new presence to be sent to all the room occupants
                    return new Presence(element, true);
                }
                else {
                    throw new NotAllowedException();
                }
            }
        }
        return null;
    }
View Full Code Here

Examples of org.jivesoftware.openfire.muc.NotAllowedException

                            }
                        }
                        else {
                            // Room does not exist and delegate does not recognize it and does
                            // not allow room creation
                            throw new NotAllowedException();

                        }
                    }
                    else {
                        // The room does not exist so check for creation permissions
                        // Room creation is always allowed for sysadmin
                        if (isRoomCreationRestricted() && !sysadmins.contains(userjid.toBareJID())) {
                            // The room creation is only allowed for certain JIDs
                            if (!allowedToCreate.contains(userjid.toBareJID())) {
                                // The user is not in the list of allowed JIDs to create a room so raise
                                // an exception
                                throw new NotAllowedException();
                            }
                        }
                        room.addFirstOwner(userjid.toBareJID());
                        created = true;
                    }
View Full Code Here

Examples of org.jivesoftware.openfire.muc.NotAllowedException

    public void setRole(MUCRole.Role newRole) throws NotAllowedException {
        // Don't allow to change the role to an owner or admin unless the new role is moderator
        if (MUCRole.Affiliation.owner == affiliation || MUCRole.Affiliation.admin == affiliation) {
            if (MUCRole.Role.moderator != newRole) {
                throw new NotAllowedException();
            }
        }
        // A moderator cannot be kicked from a room
        if (MUCRole.Role.moderator == role && MUCRole.Role.none == newRole) {
            throw new NotAllowedException();
        }
        // TODO A moderator MUST NOT be able to revoke voice from a user whose affiliation is at or
        // TODO above the moderator's level.

        role = newRole;
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.