Package org.candlepin.common.exceptions

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


    @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

        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

Related Classes of org.candlepin.common.exceptions.GoneException

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.