Ejemplo n.º 1
0
  private org.apache.rave.model.Person getFromRepository(String userId) {

    org.apache.rave.model.Person person = repository.findByUsername(userId);
    if (person == null) {
      throw new ProtocolException(
          HttpServletResponse.SC_NOT_FOUND, "The person with the id " + userId + " was not found.");
    }
    return person;
  }