Examples of NotFoundException


Examples of com.netflix.paas.exceptions.NotFoundException

    public DbDataResource getSchemaDataResource(
          @PathParam("schema") String schemaName
          ) throws NotFoundException {
        DbDataResource resource = schemaResources.get(schemaName);
        if (resource == null) {
            throw new NotFoundException(DbDataResource.class, schemaName);
        }
        return resource;
    }
View Full Code Here

Examples of com.netflix.simianarmy.NotFoundException

        LOGGER.info(String.format("Terminating instance %s in region %s.", instanceId, region));
        try {
            ec2Client().terminateInstances(new TerminateInstancesRequest(Arrays.asList(instanceId)));
        } catch (AmazonServiceException e) {
            if (e.getErrorCode().equals("InvalidInstanceID.NotFound")) {
                throw new NotFoundException("AWS instance " + instanceId + " not found", e);
            }
            throw e;
        }
    }
View Full Code Here

Examples of com.openshift.internal.client.httpclient.NotFoundException

  @Test
  public void shouldThrowExceptionWithResponseOnNotFound() throws Exception {
    try {
      // pre-conditions
      mockDirector.mockGetAny(new NotFoundException(Samples.GET_DOMAINS_FOOBAR_KO_NOTFOUND.getContentAsString()));
      // operation
      service.request(new TestLink("0 require parameter", "/broker/rest/adietisheim", HttpMethod.GET),
          IHttpClient.NO_TIMEOUT, Collections.<Parameter> emptyList(), Collections.<Parameter> emptyList());
      // verifications
      fail("OpenShiftEndPointException expected, did not occurr");
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.NotFoundException

    }

    public File getCertificateFile(Long credentialId, CbUser user) {
        Credential credential = credentialRepository.findOne(credentialId);
        if (credential == null) {
            throw new NotFoundException(String.format("Credential '%s' not found", credentialId));
        }
        return new File(getUserCerFileName(credential, azureStackUtil.emailAsFolder(user)));
    }
View Full Code Here

Examples of com.sun.jersey.api.NotFoundException

    public Response post(@FormParam("attribute_names") List<String> attrNames,
                         @FormParam("subjectid") String subjectId)
    {
        UserRecord rec = sm.getByToken(subjectId);
        if (rec == null) {
            throw new NotFoundException("No such token " + subjectId);
        }

        StringBuffer res = new StringBuffer(PREFIX + "token.id=" + subjectId + "\n");

        Attributes attrs = rec.getAttributes();
View Full Code Here

Examples of com.sun.jersey.samples.jersey_ejb.exceptions.NotFoundException

    public void deleteMessage(@PathParam("msgNum") int msgNum) throws NotFoundException {
        boolean deleted = singleton.deleteMessage(msgNum);

        if(!deleted) {
            // This exception will be mapped to a 404 response
            throw new NotFoundException();
        }
    }
View Full Code Here

Examples of com.taskadapter.redmineapi.NotFoundException

    if (responseCode == HttpStatus.SC_FORBIDDEN) {
      throw new NotAuthorizedException(
          "Forbidden. Please check the user has proper permissions.");
    }
    if (responseCode == HttpStatus.SC_NOT_FOUND) {
      throw new NotFoundException(
          "Server returned '404 not found'. response body:"
              + getContent(httpResponse));
    }

    if (responseCode == HttpStatus.SC_UNPROCESSABLE_ENTITY) {
View Full Code Here

Examples of com.wordnik.swagger.sample.exception.NotFoundException

      throws NotFoundException {
    Pet pet = petData.getPetbyId(ru.getLong(0, 100000, 0, petId));
    if (null != pet) {
      return Response.ok().entity(pet).build();
    } else {
      throw new NotFoundException(404, "Pet not found");
    }
  }
View Full Code Here

Examples of com.yourpackagename.framework.exception.database.NotFoundException

        User user = userRepository.findByUsername(username);

        if(user != null) {
            return user;
        } else {
            throw new NotFoundException(key.unfMsg, key.unfCode);
        }
    }
View Full Code Here

Examples of commons.NotFoundException

  public User removeUser(User user) throws NotFoundException {
    if(user==null)
      throw new NullPointerException("user should not be null");
    User ua=userDao.findByEmailName(user.getEmail());
    if(ua==null)
      throw new NotFoundException();
    return userDao.removeUser(user);
  }
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.