Examples of GoneException


Examples of br.com.caelum.restfulie.http.error.GoneException

      throw new ConflictException("Http error " + code
          + " when executing request");
    }

    if (code == 410) {
      throw new GoneException("Http error " + code
          + " when executing request");
    }

    if (code == 412) {
      throw new PreconditionFailedException("Http error " + code
View Full Code Here

Examples of org.candlepin.common.exceptions.GoneException

        public Consumer lookup(String key) {
            initialize();
            if (deletedConsumerCurator.countByConsumerUuid(key) > 0) {
                log.debug("Key " + key + " is deleted, throwing GoneException");
                I18n i18n = injector.getInstance(I18n.class);
                throw new GoneException(i18n.tr("Unit {0} has been deleted", key), key);
            }

            return consumerCurator.findByUuid(key);
        }
View Full Code Here

Examples of org.candlepin.common.exceptions.GoneException

    @Path("/{username}")
    @Produces(MediaType.APPLICATION_JSON)
    public void deleteUser(@PathParam("username") String username) {
        User user = userService.findByLogin(username);
        if (user == null) {
            throw new GoneException(i18n.tr("User {0} not found", username), username);
        }
        else {
            userService.deleteUser(user);
        }
    }
View Full Code Here

Examples of org.candlepin.common.exceptions.GoneException

        if (consumerUuid != null) {
            // If this UUID has been deleted, return a 410.
            if (deletedConsumerCurator.countByConsumerUuid(consumerUuid) > 0) {
                log.debug("Key " + consumerUuid + " is deleted, throwing GoneException");
                throw new GoneException(
                    i18n.tr("Unit {0} has been deleted", consumerUuid), consumerUuid);
            }

            Consumer consumer = this.consumerCurator.getConsumer(consumerUuid);
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.