Package javax.ws.rs

Examples of javax.ws.rs.NotFoundException


                    org.apache.cxf.common.i18n.Message errorM =
                        new org.apache.cxf.common.i18n.Message("NO_SUBRESOURCE_FOUND",
                                                               BUNDLE,
                                                               subResourcePath);
                    LOG.severe(errorM.toString());
                    throw new NotFoundException();
                }

                OperationResourceInfo subOri = JAXRSUtils.findTargetMethod(subCri,
                                                         inMessage,
                                                         httpMethod,
View Full Code Here


            org.apache.cxf.common.i18n.Message errorM =
                new org.apache.cxf.common.i18n.Message("NULL_SUBRESOURCE",
                                                       BUNDLE,
                                                       subResourcePath);
            LOG.info(errorM.toString());
            throw new NotFoundException();
        }

        return result;
    }
View Full Code Here

   @GET
   @Path("subscribers/{name}")
   public void longPoll(@PathParam("name") String name, final @Suspended AsyncResponse response)
   {
      final Subscriber subscriber = subscribers.get(name);
      if (subscriber == null) throw new NotFoundException();
      executor.execute(new Runnable()
      {
         @Override
         public void run()
         {
View Full Code Here

   @Produces("application/json")
   @Path("{id}")
   public void update(@PathParam("id") String id, Role role) throws Exception
   {
      Role storedRole = (Role) cache.get(roleCacheEntry(id));
      if (storedRole == null) throw new NotFoundException();
      if (role.getName() != null) storedRole.setName(role.getName());
      cache.put(roleCacheEntry(id), storedRole, -1, TimeUnit.MILLISECONDS);
   }
View Full Code Here

   @Path("{id}")
   @Produces("application/json")
   public Role get(@PathParam("id") String id)
   {
      Role storedRole = (Role) cache.get(roleCacheEntry(id));
      if (storedRole == null) throw new NotFoundException();
      return storedRole;
   }
View Full Code Here

   @Produces("application/json")
   @Path("{id}")
   public void update(@PathParam("id") String id, StoredUser user) throws Exception
   {
      StoredUser stored = getStoredUser(id);
      if (stored == null) throw new NotFoundException();
      if (user.getName() != null) stored.setName(user.getName());
      if (user.getEnabled() != null) stored.setEnabled(user.getEnabled());
      if (user.getEmail() != null) stored.setEmail((user.getEmail()));
      if (user.getCredentials() != null && user.getCredentials().containsKey("password"))
      {
View Full Code Here

   @Path("{id}")
   @Produces("application/json")
   public User get(@PathParam("id") String id)
   {
      StoredUser user = getStoredUser(id);
      if (user == null) throw new NotFoundException();

      return user.toUser();
   }
View Full Code Here

      {
         extractor = new StringParameterInjector(type, genericType, paramName, PathParam.class, defaultValue, target, annotations, factory) {
            @Override
            protected void throwProcessingException(String message, Throwable cause)
            {
               throw new NotFoundException(message, cause);
            }
         };
      }
      this.paramName = paramName;
      this.encode = encode;
View Full Code Here

   }

   @Override
   protected void throwProcessingException(String message, Throwable cause)
   {
      throw new NotFoundException(message, cause);

   }
View Full Code Here

   }

   @Override
   protected void throwProcessingException(String message, Throwable cause)
   {
      throw new NotFoundException(message, cause);
   }
View Full Code Here

TOP

Related Classes of javax.ws.rs.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.