Package javax.ws.rs

Examples of javax.ws.rs.NotFoundException


   protected BuiltResponse invokeOnTargetObject(HttpRequest request, HttpResponse response, Object target)
   {
      if (target == null)
      {
         NotFoundException notFound = new NotFoundException("Null subresource for path: " + request.getUri().getAbsolutePath());
         throw notFound;
      }
      Class<? extends Object> clazz = target.getClass();
      LocatorRegistry registry = cachedSubresources.get(clazz);
      if (registry == null)
View Full Code Here


    protected Node nodeWithId( String id,
                               Session session ) throws RepositoryException {
        try {
            return session.getNodeByIdentifier(id);
        } catch (ItemNotFoundException infe) {
            throw new NotFoundException(infe.getMessage(), infe);
        }
    }
View Full Code Here

         case 400:
            throw new BadRequestException(response);
         case 401:
            throw new NotAuthorizedException(response);
         case 404:
            throw new NotFoundException(response);
         case 405:
            throw new NotAllowedException(response);
         case 406:
            throw new NotAcceptableException(response);
         case 415:
View Full Code Here

         throw new InternalServerErrorException(request.getUri().getPath() + " is not initial request.  Its suspended and retried.  Aborting.");
      }
      ResourceInvoker invoker = registry.getResourceInvoker(request);
      if (invoker == null)
      {
         throw new NotFoundException("Unable to find JAX-RS resource associated with path: " + request.getUri().getPath());
      }
      return invoker;
   }
View Full Code Here

            }
         }
      }
      if (matches.size() == 0)
      {
         throw new NotFoundException("Could not find resource for full path: " + request.getUri().getRequestUri());
      }
      Match match = match(matches, request.getHttpMethod(), request);
      match.expression.populatePathParams(request, match.matcher, path);
      return match.expression.getInvoker();
View Full Code Here

               uriInfo.pushMatchedURI(substring);
            }
            return expression.getRoot();
         }
      }
      throw new NotFoundException("Could not find resource for full path: " + request.getUri().getRequestUri());
   }
View Full Code Here

   {
      Realm realm = identityManager.getRealm(id);
      if (realm == null)
      {
         logger.debug("realm not found");
         throw new NotFoundException();
      }
      return realmRep(realm, uriInfo);
   }
View Full Code Here

   {
      Realm realm = identityManager.getRealm(id);
      if (realm == null)
      {
         logger.debug("realm not found");
         throw new NotFoundException();
      }
      return realmHtml(realm);
   }
View Full Code Here

      Realm realm = identityManager.getRealm(realmName);
      if (realm == null)
      {
         logger.debug("realm not found");
         throw new NotFoundException();
      }
      if (!realm.isEnabled())
      {
         return Response.ok("Realm not enabled").type("text/html").build();
      }
View Full Code Here

   @Path("{token}")
   @RolesAllowed({"token-verifier", "admin"})
   public Access get(@PathParam("token") String tokenId) throws NotFoundException
   {
      Access access = (Access)cache.get("/tokens/" + tokenId);
      if (access == null) throw new NotFoundException();
      if (access.getToken().getExpires().getTimeInMillis() < System.currentTimeMillis())
      {
         cache.remove("/tokens/" + tokenId);
         throw new NotFoundException();
      }
      return access;
   }
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.