Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.NotFoundException


  @Path("/{user}")
  @Consumes("application/json")
  public Response updatePlacelist(@PathParam("user") String user, PlaceList placelist) {
    PlaceList oldplacelist = repository.get(user);
    if (oldplacelist == null) {
      throw new NotFoundException("El usuario "+user+" no fue encontrado");     
    }
   
    if (!oldplacelist.getName().equals(placelist.getName())) {
      return Response.status(javax.ws.rs.core.Response.Status.CONFLICT).build();
    }
View Full Code Here


  @DELETE
  @Path("/{user}")
  public void removePlacelist(@PathParam("user") String name) {
    PlaceList toberemoved=repository.get(name);
    if (toberemoved == null)
      throw new NotFoundException("El usuario "+name+" no fue encontrado");
    else
      repository.remove(toberemoved);
  }
View Full Code Here

      if(p.getEtiqueta().equals(etiqueta)){
        res = p;
      }
    }
    if(res==null){
      throw new NotFoundException("El lugar  \""+etiqueta+"\" no se ha encontrado en la lista del usuario "+user+" o el usuario"+user+" no existe");
    }
    return res;
  }
View Full Code Here

  @Produces("application/json")
  public Response updatePlace(@Context UriInfo uriInfo,@PathParam("user") String user, @PathParam("etiqueta") String PlaceEtiqueta,Place Place)
  {
    Place oldPlace = getPlace(user, PlaceEtiqueta);
    if(Place == null){
      throw new NotFoundException(PlaceEtiqueta+"no fue encontrado en "+user);
    }
    if(! oldPlace.getEtiqueta().equals(Place.getEtiqueta())){
      return Response.status(javax.ws.rs.core.Response.Status.CONFLICT).build();
    }
    oldPlace.setDia(Place.getDia());
View Full Code Here

    public List<name.pehl.karaka.shared.model.Tag> list()
    {
        List<Tag> tags = repository.list();
        if (tags.isEmpty())
        {
            throw new NotFoundException("No tags found");
        }
        List<name.pehl.karaka.shared.model.Tag> result = new ArrayList<name.pehl.karaka.shared.model.Tag>();
        for (Tag tag : tags)
        {
            result.add(converter.toModel(tag));
View Full Code Here

    public List<name.pehl.karaka.shared.model.Project> list()
    {
        List<Project> projects = repository.list();
        if (projects.isEmpty())
        {
            throw new NotFoundException("No projects found");
        }
        List<name.pehl.karaka.shared.model.Project> result = new ArrayList<name.pehl.karaka.shared.model.Project>();
        for (Project project : projects)
        {
            result.add(converter.toModel(project));
View Full Code Here

    public List<name.pehl.karaka.shared.model.Client> list()
    {
        List<Client> clients = repository.list();
        if (clients.isEmpty())
        {
            throw new NotFoundException("No clients found");
        }
        List<name.pehl.karaka.shared.model.Client> result = new ArrayList<name.pehl.karaka.shared.model.Client>();
        for (Client client : clients)
        {
            result.add(converter.toModel(client));
View Full Code Here

    public Response years()
    {
        List<Activity> activities = repository.list();
        if (activities.isEmpty())
        {
            throw new NotFoundException("No activities found");
        }
        Map<Integer, Year> lookup = new HashMap<Integer, Year>();
        for (Activity activity : activities)
        {
            int y = activity.getStart().getYear();
View Full Code Here

    public name.pehl.karaka.shared.model.Activity runningActivity()
    {
        Activity activity = repository.findRunningActivity();
        if (activity == null)
        {
            throw new NotFoundException("No running activity");
        }
        return activityConverter.toModel(activity);
    }
View Full Code Here

    public name.pehl.karaka.shared.model.Activity latestActivity()
    {
        Activity activity = repository.findLatestActivity();
        if (activity == null)
        {
            throw new NotFoundException("No latest activity");
        }
        return activityConverter.toModel(activity);
    }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.NotFoundException

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.